PageSourceSearch

https://careplanpro.ai/assets/FamilyPlans-D3T2_XNa.js

js careplanpro.ai collected 2026-10-05 11:54:35 UTC 29,488 bytes, 6 lines download raw bytes

1import{c as ie,r as g,j as e,B as H,U as B,D as R,aG as y,I,m as oe,au as F,q as Q,t as W,v as ce,w as ne,F as de,f as k}from"./index-B9m0jA0r.js";import{P as me}from"./phone-input-CL7exIJI.js";import{B as ee}from"./badge-Deq2Zmk0.js";import{C as V,a as D}from"./card-BIA7MWLi.js";import{T as xe,b as he,c as T,a as _}from"./tabs-ng7jIZ-f.js";import{S as E,a as L,b as O,c as z,d as j}from"./select-CZUNzdpL.js";import{L as v}from"./label-CHLwbswP.js";import{M as U}from"./membershipBilling-CugOoR-V.js";import{P as ue}from"./plus-CRAt7_0T.js";import{H as w}from"./house-WL8fRhhZ.js";import{H as se}from"./heart-DhSBPkva.js";import{S as pe}from"./search-DNBvS_5l.js";import{C as G}from"./circle-check-KSfehY7a.js";import{C as fe}from"./chevron-right-bf18FZXn.js";import{C as te}from"./circle-alert-DjF4ISmT.js";import{C as ge}from"./clock-CchIC7LV.js";import{C as je}from"./circle-x-CFoGnSL1.js";import{U as be}from"./user-Cje6Jxb6.js";import{Z as Ne}from"./zap-1IcN1J7o.js";import{T as ve}from"./target-CJUl-Eur.js";import{I as ye}from"./infinity-CkcOdjyL.js";import{M as Ce}from"./mail-WIsOkhn3.js";import{P as Pe}from"./phone-l6RA8FW3.js";import{U as we}from"./user-plus-BSrs092a.js";import"./phone-CzY9Lu_e.js";import"./index-sPIgdySf.js";import"./index-BdQq_4o_.js";import"./index-CjHmcE51.js";import"./chevron-up-D50tYA58.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Me=ie("Baby",[["path",{d:"M9 12h.01",key:"157uk2"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"5yv0yz"}]]),N={relief:{primary:149,additional:119,carepassPrimary:119,carepassAdditional:95},restoration:{primary:299,additional:239,carepassPrimary:239,carepassAdditional:191},performance:{primary:199,additional:159,carepassPrimary:159,carepassAdditional:127}},$=6,Ae=new Date,He=l=>l.toISOString().split("T")[0],r=l=>{const t=new Date(Ae);return t.setDate(t.getDate()-l),He(t)},M=[{id:"hh_001",accountHolderName:"Sarah Mitchell",accountHolderEmail:"[email protected]",accountHolderPhone:"(555) 123-4567",status:"active",createdAt:r(120),billingTier:"restoration",billingCycle:"monthly",basePrice:299,additionalMemberPrice:239,totalMonthly:777,cardLast4:"4242",cardBrand:"visa",familyDiscountPercent:20,maxMembers:6},{id:"hh_002",accountHolderName:"Michael Brown",accountHolderEmail:"[email protected]",accountHolderPhone:"(555) 987-6543",status:"active",createdAt:r(200),billingTier:"performance",billingCycle:"annual",basePrice:199,additionalMemberPrice:159,totalMonthly:517,cardLast4:"8888",cardBrand:"mastercard",familyDiscountPercent:20,maxMembers:6},{id:"hh_003",accountHolderName:"Jennifer Lopez",accountHolderEmail:"[email protected]",accountHolderPhone:"(555) 456-7890",status:"past_due",createdAt:r(60),billingTier:"relief",billingCycle:"monthly",basePrice:149,additionalMemberPrice:119,totalMonthly:268,cardLast4:"1111",cardBrand:"amex",familyDiscountPercent:20,maxMembers:6},{id:"hh_004",accountHolderName:"Robert Taylor",accountHolderEmail:"[email protected]",accountHolderPhone:"(555) 321-0987",status:"active",createdAt:r(300),billingTier:"restoration",billingCycle:"monthly",basePrice:239,additionalMemberPrice:191,totalMonthly:1012,cardLast4:"5555",cardBrand:"visa",familyDiscountPercent:20,maxMembers:6}],A=[{id:"fm_001",householdId:"hh_001",name:"Sarah Mitchell",email:"[email protected]",role:"primary",dateOfBirth:"1985-03-15",tier:"restoration",isAccountHolder:!0,enrolledAt:r(120),lastVisit:r(3),visitsThisMonth:3,totalVisits:24,monthlyRate:299,carePassActive:!0,status:"active"},{id:"fm_002",householdId:"hh_001",name:"David Mitchell",email:"[email protected]",role:"spouse",dateOfBirth:"1983-07-22",tier:"restoration",isAccountHolder:!1,enrolledAt:r(110),lastVisit:r(5),visitsThisMonth:2,totalVisits:18,monthlyRate:239,carePassActive:!0,status:"active"}
6,{id:"fm_003",householdId:"hh_001",name:"Emma Mitchell",email:"",role:"child",dateOfBirth:"2012-11-08",tier:"restoration",isAccountHolder:!1,enrolledAt:r(90),lastVisit:r(10),visitsThisMonth:1,totalVisits:8,monthlyRate:239,carePassActive:!1,status:"active"},{id:"fm_004",householdId:"hh_002",name:"Michael Brown",email:"[email protected]",role:"primary",dateOfBirth:"1978-01-30",tier:"performance",isAccountHolder:!0,enrolledAt:r(200),lastVisit:r(2),visitsThisMonth:4,totalVisits:42,monthlyRate:199,carePassActive:!0,status:"active"},{id:"fm_005",householdId:"hh_002",name:"Lisa Brown",email:"[email protected]",role:"spouse",dateOfBirth:"1980-05-12",tier:"performance",isAccountHolder:!1,enrolledAt:r(180),lastVisit:r(4),visitsThisMonth:3,totalVisits:30,monthlyRate:159,carePassActive:!0,status:"active"},{id:"fm_006",householdId:"hh_002",name:"Tyler Brown",email:"",role:"child",dateOfBirth:"2008-09-20",tier:"performance",isAccountHolder:!1,enrolledAt:r(150),lastVisit:r(14),visitsThisMonth:1,totalVisits:12,monthlyRate:159,carePassActive:!1,status:"active"},{id:"fm_007",householdId:"hh_003",name:"Jennifer Lopez",email:"[email protected]",role:"primary",dateOfBirth:"1990-06-18",tier:"relief",isAccountHolder:!0,enrolledAt:r(60),lastVisit:r(8),visitsThisMonth:2,totalVisits:10,monthlyRate:149,carePassActive:!1,status:"active"},{id:"fm_008",householdId:"hh_003",name:"Carlos Lopez",email:"[email protected]",role:"spouse",dateOfBirth:"1988-12-02",tier:"relief",isAccountHolder:!1,enrolledAt:r(45),lastVisit:r(15),visitsThisMonth:1,totalVisits:5,monthlyRate:119,carePassActive:!1,status:"active"},{id:"fm_009",householdId:"hh_004",name:"Robert Taylor",email:"[email protected]",role:"primary",dateOfBirth:"1975-04-10",tier:"restoration",isAccountHolder:!0,enrolledAt:r(300),lastVisit:r(1),visitsThisMonth:4,totalVisits:60,monthlyRate:239,carePassActive:!0,status:"active"},{id:"fm_010",householdId:"hh_004",name:"Karen Taylor",email:"[email protected]",role:"spouse",dateOfBirth:"1977-08-25",tier:"restoration",isAccountHolder:!1,enrolledAt:r(280),lastVisit:r(3),visitsThisMonth:3,totalVisits:48,monthlyRate:191,carePassActive:!0,status:"active"},{id:"fm_011",householdId:"hh_004",name:"Jake Taylor",email:"",role:"child",dateOfBirth:"2005-02-14",tier:"restoration",isAccountHolder:!1,enrolledAt:r(250),lastVisit:r(7),visitsThisMonth:2,totalVisits:30,monthlyRate:191,carePassActive:!0,status:"active"},{id:"fm_012",householdId:"hh_004",name:"Sophie Taylor",email:"",role:"child",dateOfBirth:"2010-10-30",tier:"restoration",isAccountHolder:!1,enrolledAt:r(200),lastVisit:r(12),visitsThisMonth:1,totalVisits:18,monthlyRate:191,carePassActive:!0,status:"active"}],Se=[{id:"hp_001",householdId:"hh_001",date:r(5),amount:777,status:"succeeded",description:"Restoration Family — 3 members",memberCount:3},{id:"hp_002",householdId:"hh_001",date:r(35),amount:777,status:"succeeded",description:"Restoration Family — 3 members",memberCount:3},{id:"hp_003",householdId:"hh_002",date:r(10),amount:517,status:"succeeded",description:"Performance Family — 3 members",memberCount:3},{id:"hp_004",householdId:"hh_003",date:r(2),amount:268,status:"failed",description:"Relief Family — 2 members",memberCount:2},{id:"hp_005",householdId:"hh_003",date:r(32),amount:268,status:"succeeded",description:"Relief Family — 2 members",memberCount:2},{id:"hp_006",householdId:"hh_004",date:r(3),amount:1012,status:"succeeded",description:"Restoration Family (CarePass) — 4 members",memberCount:4},{id:"hp_007",householdId:"hh_004",date:r(33),amount:1012,status:"succeeded",description:"Restoration Family (CarePass) — 4 members",memberCount:4}];function Te(){const l=M.filter(a=>a.status==="active"),t=A.filter(a=>a.status==="active").length,d=l.reduce((a,c)=>a+c.totalMonthly,0),o=t/(l.length||1),m=A.filter(a=>a.carePassActive).length;return{totalHouseholds:M.length,activeHouseholds:l.length,totalMembers:t,familyMRR:d,avgHouseholdSize:Math.round(o*10)/10,carePassMembers:m,pastDueHouseholds:M.filter(a=>a.status==="past_due").length,totalSavings:A.filter(a=>!a.isAccountHolder&&a.status==="active").reduce((a,c)=>{const h=N[c.tier];return a+(h.primary-c.monthlyRate)},0)}}function K(l,t,d){const o=N[l],m=d?o.carepassPrimary:o.primary,a=d?o.carepassAdditional:o.additional,c=Math.max(0,t-1),h=m+a*c,n=o.primary*t-h;return{primary:m,perAdditional:a,total:h,savings:n}}const ae={active:{label:"Active",color:"hsl(var(--primary))",icon:G},past_due:{label:"Past Due",color:"#EF4444",icon:te},paused:{label:"Paused",color:"#F59E0B",icon:ge},cancelled:{label:"Cancelled",color:"#6B7280",icon:je}},J={primary:{label:"Primary",icon:de,color:"#F59E0B"},spouse:{label:"Spouse",icon:se,color:"#EC4899"},child:{label:"Child",icon:Me,color:"#0071E3"},dependent:{label:"Dependent",icon:be,color:"#8B5CF6"}},q={relief:Ne,restoration:ve,performance:ye};function P({icon:l,label:t,value:d,subtext:o,color:m}){return e.jsx(V,{className:"bg-card border-border/50",children:e.jsx(D,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wider",children:t}),e.jsx("p",{className:"text-2xl font-bold text-foreground",children:d}),o&&e.jsx("p",{className:"text-xs text-muted-foreground",children:o})]}),e.jsx("div",{className:"p-2.5 rounded-xl",style:{background:`${m}15`},children:e.jsx(l,{className:"h-5 w-5",style:{color:m}})})]})})})}function cs(){const[l,t]=g.useState(""),[d,o]=g.useState("all"),[m,a]=g.useState(null),[c,h]=g.useState("members"),[s,n]=g.useState(!1),u=g.useMemo(()=>Te(),[]),X=g.useMemo(()=>M.filter(i=>{const x=i.accountHolderName.toLowerCase().includes(l.toLowerCase())||i.accountHolderEmail.toLowerCase().includes(l.toLowerCase()),p=d==="all"||i.status===d;return x&&p}),[l,d]),Y=i=>A.filter(x=>x.householdId===i),re=i=>Se.filter(x=>x.householdId===i);return e.jsxs("div",{className:"space-y-8 max-w-7xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Family Plans"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Household accounts with shared membership billing"})]}
6),e.jsxs(H,{className:"bg-primary text-primary-foreground gap-2",onClick:()=>n(!0),children:[e.jsx(ue,{className:"h-4 w-4"}),"New Family Plan"]})]}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx(P,{icon:w,label:"Households",value:String(u.activeHouseholds),subtext:`${u.totalHouseholds} total`,color:"hsl(210, 100%, 45%)"}),e.jsx(P,{icon:B,label:"Family Members",value:String(u.totalMembers),subtext:`~${u.avgHouseholdSize} per household`,color:"#0071E3"}),e.jsx(P,{icon:R,label:"Family Revenue",value:`$${u.familyMRR.toLocaleString()}`,subtext:`$${u.totalSavings}/mo in family savings`,color:"#8B5CF6"}),e.jsx(P,{icon:se,label:"CarePass Members",value:String(u.carePassMembers),subtext:`${u.pastDueHouseholds} past due`,color:"#EC4899"})]}),e.jsx(V,{className:"bg-card border-border/50",children:e.jsxs(D,{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(R,{className:"h-4 w-4 text-primary"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Family Pricing Quick Reference"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:["relief","restoration","performance"].map(i=>{const x=U.find(S=>S.id===i),p=N[i],C=q[i],b=K(i,4,!1);return e.jsxs("div",{className:"rounded-xl p-4 border border-border/30",style:{background:`${x.color}08`},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg flex items-center justify-center",style:{background:`${x.color}20`},children:e.jsx(C,{className:"h-4 w-4",style:{color:x.color}})}),e.jsx("span",{className:"font-semibold text-sm text-foreground",children:x.name})]}),e.jsxs("div",{className:"space-y-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Primary member"}),e.jsxs("span",{className:"font-medium text-foreground",children:["$",p.primary,"/mo"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Each additional"}),e.jsxs("span",{className:"font-medium text-foreground",children:["$",p.additional,"/mo"]})]}),e.jsx(y,{className:"bg-border/30 my-1.5"}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Family of 4"}),e.jsxs("span",{className:"font-bold text-foreground",children:["$",b.total,"/mo"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"vs. individual"}),e.jsxs("span",{className:"font-medium text-primary",children:["Save $",b.savings,"/mo"]})]})]})]},i)})})]})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(I,{placeholder:"Search households…",value:l,onChange:i=>t(i.target.value),className:"pl-9 bg-card border-border/50"})]}),e.jsxs(E,{value:d,onValueChange:o,children:[e.jsx(L,{className:"w-[140px] bg-card border-border/50",children:e.jsx(O,{})}),e.jsxs(z,{children:[e.jsx(j,{value:"all",children:"All Status"}),e.jsx(j,{value:"active",children:"Active"}),e.jsx(j,{value:"past_due",children:"Past Due"}),e.jsx(j,{value:"paused",children:"Paused"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[X.map(i=>{const x=ae[i.status],p=Y(i.id),C=p.filter(f=>f.status==="active").length,b=U.find(f=>f.id===i.billingTier),S=q[i.billingTier];return e.jsx(oe.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"group",children:e.jsx(V,{className:"bg-card border-border/50 hover:border-primary/30 transition-all cursor-pointer",onClick:()=>{a(i),h("members")},children:e.jsx(D,{className:"p-5",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-xl flex items-center justify-center",style:{background:`${b.color}15`},children:e.jsx(w,{className:"h-6 w-6",style:{color:b.color}})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h3",{className:"font-semibold text-foreground",children:[i.accountHolderName," Household"]}),e.jsx(ee,{variant:"outline",className:"text-[10px] border-0 px-2 py-0.5",style:{background:`${x.color}15`,color:x.color},children:x.label})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"h-3 w-3"}),C," member",C!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(S,{className:"h-3 w-3",style:{color:b.color}}),b.name]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"h-3 w-3"}),i.cardBrand.toUpperCase()," ••",i.cardLast4]}),p.some(f=>f.carePassActive)&&e.jsxs("span",{className:"flex items-center gap-1 text-primary",children:[e.jsx(G,{className:"h-3 w-3"}),"CarePass"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex -sp
6ace-x-2",children:[p.slice(0,4).map(f=>{const Z=J[f.role];return e.jsx("div",{className:"h-8 w-8 rounded-full border-2 border-card flex items-center justify-center text-[10px] font-bold",style:{background:`${Z.color}20`,color:Z.color},children:f.name.split(" ").map(le=>le[0]).join("")},f.id)}),p.length>4&&e.jsxs("div",{className:"h-8 w-8 rounded-full border-2 border-card bg-secondary flex items-center justify-center text-[10px] font-medium text-muted-foreground",children:["+",p.length-4]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["$",i.totalMonthly,"/mo"]}),e.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:i.billingCycle})]}),e.jsx(fe,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors"})]})]})})})},i.id)}),X.length===0&&e.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[e.jsx(w,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"No family plans found"})]})]}),e.jsx(Q,{open:!!m,onOpenChange:i=>!i&&a(null),children:e.jsx(W,{className:"max-w-3xl max-h-[85vh] overflow-y-auto bg-card border-border/50",children:m&&e.jsx(_e,{household:m,members:Y(m.id),payments:re(m.id),activeTab:c,onTabChange:h})})}),e.jsx(Q,{open:s,onOpenChange:n,children:e.jsxs(W,{className:"max-w-lg bg-card border-border/50",children:[e.jsx(ce,{children:e.jsx(ne,{className:"text-foreground",children:"Create Family Plan"})}),e.jsx($e,{onClose:()=>n(!1)})]})})]})}function _e({household:l,members:t,payments:d,activeTab:o,onTabChange:m}){const a=ae[l.status],c=U.find(s=>s.id===l.billingTier),h=K(l.billingTier,t.filter(s=>s.status==="active").length,t.some(s=>s.carePassActive));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"h-14 w-14 rounded-xl flex items-center justify-center",style:{background:`${c.color}15`},children:e.jsx(w,{className:"h-7 w-7",style:{color:c.color}})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h2",{className:"text-xl font-bold text-foreground",children:[l.accountHolderName," Household"]}),e.jsx(ee,{variant:"outline",className:"border-0 text-xs px-2",style:{background:`${a.color}15`,color:a.color},children:a.label})]}),e.jsxs("div",{className:"flex items-center gap-4 mt-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ce,{className:"h-3 w-3"}),l.accountHolderEmail]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Pe,{className:"h-3 w-3"}),l.accountHolderPhone]})]})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:["$",l.totalMonthly,"/mo"]}),e.jsxs("p",{className:"text-xs text-primary",children:["Save $",h.savings,"/mo vs. individual"]})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-secondary/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.filter(s=>s.status==="active").length}),e.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Members"})]}),e.jsxs("div",{className:"bg-secondary/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:c.name}),e.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Tier"})]}),e.jsxs("div",{className:"bg-secondary/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.reduce((s,n)=>s+n.visitsThisMonth,0)}),e.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Visits/Mo"})]}),e.jsxs("div",{className:"bg-secondary/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:l.billingCycle}),e.jsx("p",{className:"text-[10px] text-muted-foreground uppercase",children:"Billing"})]})]}),e.jsx(y,{className:"bg-border/30"}),e.jsxs(xe,{value:o,onValueChange:m,children:[e.jsxs(he,{className:"bg-secondary/50 w-full",children:[e.jsxs(T,{value:"members",className:"flex-1 text-xs",children:[e.jsx(B,{className:"h-3.5 w-3.5 mr-1.5"}),"Members"]}),e.jsxs(T,{value:"billing",className:"flex-1 text-xs",children:[e.jsx(F,{className:"h-3.5 w-3.5 mr-1.5"}),"Billing"]}),e.jsxs(T,{value:"pricing",className:"flex-1 text-xs",children:[e.jsx(R,{className:"h-3.5 w-3.5 mr-1.5"}),"Pricing"]})]}),e.jsxs(_,{value:"members",className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.length," of ",$," max members"]}),t.length<$&&e.jsxs(H,{size:"sm",variant:"outline",className:"gap-1.5 text-xs border-border/50",onClick:()=>k.success("Add member form would open"),children:[e.jsx(we,{className:"h-3.5 w-3.5"}),"Add Member"]})]}),t.map(s=>{const n=J[s.role],u=n.icon;return q[s.tier],e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-secondary/30 hover:bg-secondary/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-full flex items-center justify-center",style:{background:`${n.color}15`},children:e.jsx(u,{className:"h-4.5 w-4.5",style:{color:n.color}})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.name}),e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full",style:{background:`${n.color}15`,color:n.color},children:n.label}),s.isAccountHolder&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-primary/10 text-primary",children:"Account Holder"}),s.carePassActive&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-primary/10 text-primary",children:"CarePass"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.email||"No email"," · DOB: ",s.dateOfBirth]})]})]}),e.jsxs("div",{className:"flex items-center gap-6 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-medium text-foreground",children:s.visitsThisMonth}),e.jsx("p",{className:"text-[10px]",children:"This Mo."})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-medium text-foreground",children:s.totalVisits}),e.jsx("p",{className:"text-[10px]",children:"Total"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["$",s.monthlyRate,"/mo"]}),e.jsx("p",{className:"text-[10px]",children:s.isAccountHolder?"Primary rate":"Family rate"})]})]})]},s.id)})]}),e.jsxs(_,{value:"billing",className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Payment history"}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(F,{className:"h-3 w-3"}),l.cardBrand.toUpperCase()," ending ",l.cardLast4]})]}),d.map(s=>{const n=s.status==="succeeded";return e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-secondary/30",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`h-9 w-9 rounded-lg flex items-center justify-center ${n?"bg-primary/10":"bg-destructive/10"}`,children:n?e.jsx(G,{className:"h-4 w-4 text-primary"}):e.jsx(te,{className:"h-4 w-4 text-destructive"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium text-foreground",children:["$",s.amount.toLocaleStr
6ing()]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]})]}),e.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[e.jsx("p",{children:s.date}),e.jsx("p",{className:n?"text-primary":"text-destructive",children:s.status})]})]},s.id)})]}),e.jsxs(_,{value:"pricing",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-xl border border-border/30 p-4 space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Current Plan Breakdown"}),t.filter(s=>s.status==="active").map((s,n)=>e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground",children:s.name}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",J[s.role].label,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[n>0&&e.jsx("span",{className:"text-[10px] text-primary",children:"family rate"}),e.jsxs("span",{className:"font-medium text-foreground",children:["$",s.monthlyRate,"/mo"]})]})]},s.id)),e.jsx(y,{className:"bg-border/30"}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-semibold text-foreground",children:"Total"}),e.jsxs("span",{className:"font-bold text-lg text-foreground",children:["$",l.totalMonthly,"/mo"]})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:"vs. individual pricing"}),e.jsxs("span",{className:"font-medium text-primary",children:["Saving $",h.savings,"/mo"]})]})]}),t.filter(s=>s.status==="active").length<$&&e.jsxs("div",{className:"rounded-xl border border-dashed border-border/50 p-4",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Adding another member would be:"}),e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["+$",l.billingTier==="restoration"?t.some(s=>s.carePassActive)?191:239:l.billingTier==="relief"?t.some(s=>s.carePassActive)?95:119:t.some(s=>s.carePassActive)?127:159,"/mo"]}),e.jsxs("p",{className:"text-xs text-primary mt-1",children:[l.familyDiscountPercent,"% family discount applied"]})]})]})]})]})}function $e({onClose:l}){const[t,d]=g.useState({accountHolderName:"",email:"",phone:"",tier:"restoration",billingCycle:"monthly",memberCount:2}),o=g.useMemo(()=>K(t.tier,t.memberCount,!1),[t.tier,t.memberCount]),m=()=>{if(!t.accountHolderName||!t.email){k.error("Name and email are required");return}k.success(`Family plan created for ${t.accountHolderName} — ${t.memberCount} members at $${o.total}/mo`),l()};return e.jsxs("div",{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5 col-span-2",children:[e.jsx(v,{className:"text-xs text-muted-foreground",children:"Account Holder Name"}),e.jsx(I,{value:t.accountHolderName,onChange:a=>d(c=>({...c,accountHolderName:a.target.value})),placeholder:"Sarah Mitchell",className:"bg-secondary/50 border-border/30"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(v,{className:"text-xs text-muted-foreground",children:"Email"}),e.jsx(I,{value:t.email,onChange:a=>d(c=>({...c,email:a.target.value})),placeholder:"[email protected]",className:"bg-secondary/50 border-border/30"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(v,{className:"text-xs text-muted-foreground",children:"Phone"}),e.jsx(me,{value:t.phone,onChange:a=>d(c=>({...c,phone:a})),className:"bg-secondary/50 border-border/30"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(v,{className:"text-xs text-muted-foreground",children:"Membership Tier"}),e.jsxs(E,{value:t.tier,onValueChange:a=>d(c=>({...c,tier:a})),children:[e.jsx(L,{className:"bg-secondary/50 border-border/30",children:e.jsx(O,{})}),e.jsxs(z,{children:[e.jsxs(j,{value:"relief",children:["Relief — $",N.relief.primary,"/mo"]}),e.jsxs(j,{value:"restoration",children:["Restoration — $",N.restoration.primary,"/mo"]}),e.jsxs(j,{value:"performance",children:["Performance — $",N.performance.primary,"/mo"]})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(v,{className:"text-xs text-muted-foreground",children:"Family Members"}),e.jsxs(E,{value:String(t.memberCount),onValueChange:a=>d(c=>({...c,memberCount:Number(a)})),children:[e.jsx(L,{className:"bg-secondary/50 border-border/30",children:e.jsx(O,{})}),e.jsx(z,{children:[2,3,4,5,6].map(a=>e.jsxs(j,{value:String(a),children:[a," members"]},a))})]})]})]}),e.jsxs("div",{className:"rounded-xl bg-secondary/50 p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Primary member"}),e.jsxs("span",{className:"font-medium text-foreground",children:["$",o.primary,"/mo"]})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[t.memberCount-1," additional × $",o.perAdditional]}),e.jsxs("span",{className:"font-medium text-foreground",children:["$",o.perAdditional*(t.memberCount-1),"/mo"]})]}),e.jsx(y,{className:"bg-border/30"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-semibold text-foreground",children:"Total"}),e.jsxs("span",{className:"text-xl font-bold text-foreground",children:["$",o.total,"/mo"]})]}),o.savings>0&&e.jsxs("p",{className:"text-xs text-primary text-right",children:["Saving $",o.savings,"/mo vs. individual plans"]})]}),e.jsx(y,{className:"bg-border/30"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(H,{variant:"outline",onClick:l,className:"border-border/50",children:"Cancel"}),e.jsx(H,{className:"bg-primary text-primary-foreground",onClick:m,children:"Create Family Plan"})]})]})}export{cs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.