import{j as s}from"./router.chunk.YsRm4bSN.js";import{_ as __,s as sprintf}from"./wordpress.chunk.BVds2GcU.js";import{bM as r,n,o as d,i as e,B as o,g as i,h as a,j as f,v as g,bN as u,D as c}from"./main.chunk.N-eZ2ybB.js";import{D as l}from"./dot-separator.chunk.CtyhSI2x.js";import{W as t,y as w,q as m,J as x,b3 as h,a5 as p,b4 as j}from"./icons.chunk.BwnSC3zE.js";import{f as y}from"./date-utils.chunk.DWRtWTmT.js";const N=({user:N,title:v,onRemove:_,onEdit:b,hideHeader:k=!1})=>{if(!N)return null;const z=r(N);return s.jsx(n,{className:"growfund-group/user-card growfund-min-h-60 growfund-h-fit growfund-relative",children:s.jsxs(d,{className:"growfund-space-y-3",children:[!k&&s.jsxs("div",{className:"growfund-flex growfund-items-center growfund-justify-between",children:[s.jsx("h6",{className:"growfund-typo-h6 growfund-font-medium growfund-text-fg-primary",children:v??__("User","growfund")}),s.jsxs("div",{className:"growfund-opacity-0 group-hover/user-card:growfund-opacity-100 growfund-transition-opacity",children:[_&&s.jsx(o,{variant:"ghost",size:"icon",className:"hover:growfund-text-icon-critical",onClick:_,children:s.jsx(t,{})}),b&&s.jsx(o,{variant:"ghost",size:"icon",className:"growfund-size-8 growfund-text-icon-primary",onClick:b,children:s.jsx(w,{})})]})]}),s.jsxs("div",{className:"growfund-space-y-5",children:[s.jsxs("div",{className:"growfund-flex growfund-gap-3 growfund-items-center",children:[s.jsxs(i,{className:"growfund-size-10",children:[s.jsx(a,{src:N.image?.url??void 0}),s.jsx(f,{children:z})]}),s.jsxs("div",{className:"growfund-flex growfund-flex-col growfund-gap-1 growfund-w-full",children:[s.jsx("div",{className:"growfund-text-fg-secondary growfund-typo-small growfund-font-medium growfund-break-all growfund-line-clamp-2",children:sprintf("%s %s",N.first_name,N.last_name)}),s.jsxs("div",{className:"growfund-flex growfund-items-center growfund-gap-2",children:[s.jsx("div",{className:"growfund-typo-tiny growfund-text-fg-subdued",children:N.username}),s.jsx(l,{}),Number(N.id)>0&&s.jsx("div",{className:"growfund-typo-tiny growfund-text-fg-subdued",children:sprintf(__("ID #%s","growfund"),N.id)})]})]})]}),s.jsxs("div",{className:"growfund-space-y-4",children:[s.jsxs("div",{className:"growfund-grid growfund-grid-cols-[1rem_auto] growfund-gap-2",children:[s.jsx(m,{className:"growfund-size-4 growfund-text-icon-secondary growfund-flex-shrink-0 growfund-mt-[0.125rem]"}),s.jsxs("div",{className:"growfund-space-y-2",children:[s.jsx("div",{className:"growfund-text-fg-secondary growfund-typo-small growfund-font-medium",children:N.email}),N.id&&s.jsx(s.Fragment,{children:N.is_verified?s.jsxs(g,{variant:"primary",children:[s.jsx(x,{className:"growfund-size-3 growfund-text-icon-brand"}),__("Verified","growfund")]}):s.jsx(g,{variant:"secondary",children:__("Awaiting Verification","growfund")})})]})]}),e(N.phone)&&s.jsxs("div",{className:"growfund-flex growfund-gap-2 growfund-items-start",children:[s.jsx(h,{className:"growfund-size-4 growfund-text-icon-secondary growfund-flex-shrink-0"}),s.jsx("div",{className:"growfund-text-fg-secondary growfund-font-medium growfund-typo-small",children:N.phone})]}),("shipping_address"in N&&e(N.shipping_address)||"billing_address"in N&&e(N.billing_address))&&s.jsxs("div",{className:"growfund-grid growfund-grid-cols-[1rem_auto] growfund-gap-2",children:[s.jsx(p,{className:"growfund-size-4 growfund-text-icon-secondary growfund-flex-shrink-0 growfund-mt-1"}),s.jsxs("div",{className:"growfund-space-y-3",children:["billing_address"in N&&e(N.billing_address)&&s.jsxs("div",{className:"growfund-space-y-1",children:[s.jsx("span",{className:"growfund-typo-tiny growfund-text-fg-secondary",children:__("Billing Address","growfund")}),s.jsx("div",{className:"growfund-text-fg-primary growfund-font-medium growfund-typo-small",children:u(N.billing_address)})]}),"shipping_address"in N&&N.shipping_address&&s.jsxs("div",{className:"growfund-space-y-1",children:[s.jsx("span",{className:"growfund-typo-tiny growfund-text-fg-secondary",children:__("Shipping Address","growfund")}),s.jsx("div",{className:"growfund-text-fg-primary growfund-font-medium growfund-typo-small",children:u(N.shipping_address)})]})]})]})]})]}),e(N.joined_at)&&s.jsxs("div",{className:"growfund-flex growfund-gap-2 growfund-items-start growfund-bottom-4 growfund-left-4",children:[s.jsx(j,{className:"growfund-size-4 growfund-text-icon-secondary growfund-flex-shrink-0"}),s.jsx("div",{className:"growfund-text-fg-secondary growfund-font-medium growfund-typo-tiny",children:sprintf(
/* translators: %s: joined date */
__("Joined %s","growfund"),y(new Date(N.joined_at),c.HUMAN_READABLE))})]})]})})};export{N as U};
