1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/use-upload-DeYJRo2D.js","assets/vendor-C_lr6Peh.js","assets/index-CCfJC9m9.js","assets/index-EQ5jy9v_.css"])))=>i.map(i=>d[i]); 2import{aj as Re,K as z,N as Ue,q as ce,Q as Y,h as J,Z as X,a9 as Ee,B as U,$ as Z,a0 as ee,a1 as te,ac as me,P as se,L as ue,c as Be,a as De,aa as Oe,M as Fe,H as We,U as _e,ad as Ve,dU as pe,I as W,C as ze,X as Me,_ as Te,a3 as qe}from"./index-CCfJC9m9.js";import{r as b,j as e}from"./vendor-C_lr6Peh.js";import{u as Ie,F as Le,a as g,b as v,c as C,e as N,d as P}from"./form-CYsqUbIu.js";import{u as Ge}from"./use-undo-delete-4AP6DROQ.js";import{u as He}from"./use-client-activity-gEmygSLo.js";import{u as Ke,a as Qe}from"./use-page-edit-permission-D3mzUeA_.js";import{R as Ye}from"./ReadOnlyBanner-BfNf6yAj.js";import{E as K}from"./empty-state-4a14WMSj.js";import{I as _}from"./input-BhU9ByXS.js";import{C as Q}from"./checkbox-Cw1ErITi.js";import{T as D}from"./textarea-DPKXeB9F.js";import{P as Je}from"./CountryCodeSelect-DbhepcJ0.js";import{u as Xe}from"./useSendEmail-L-XakTDj.js";import{R as Ze}from"./radio-DlQPLcqh.js";import{P as ge}from"./phone-Ckh7eGy7.js";import{U as et}from"./user-check-tsK1HA9a.js";import{S as tt}from"./send-Dla22FU7.js";import{S as M}from"./skeleton-D19tAbGf.js";import{A as L,a as $,b as A}from"./avatar-CaPyXZ9X.js";import{g as R}from"./image-utils-BMXESF92.js";import{A as F}from"./AiWritingAssist-COWhiWSj.js";import{S as ve,a as Ne,b as be,c as we,d as le}from"./select-BK7nL9Mt.js";import{P as at}from"./PageHelper-BeU7BH7D.js";import{m as k}from"./framer-motion-BelE6YLj.js";import{L as st}from"./layout-grid-DxSSbb99.js";import{C as rt}from"./columns-2-Q9-LXAwH.js";import{P as it}from"./plus-Cx32ukVL.js";import{P as xe}from"./pen-CFaetubi.js";import{T as he}from"./trash-2-q_yUbozN.js";import{P as Se}from"./pen-line-CRWb5ajB.js";import{B as nt}from"./book-open-DqKN7LOm.js";import{C as ae}from"./cloud-upload-B8MjPrZV.js";import"./label-Dpeci-J4.js";import"./use-subscription-Dj7B6Nie.js";import"./demo-ids-C3w4-fo9.js";import"./platform-fee-BZJQyPPG.js";import"./page-keys-BDtq94uI.js";import"./timeline-plan-ZjlsdQli.js";import"./free-plan-galleries-D1cMJAx6.js";import"./free-tier-pages-BMmaBexb.js";import"./lock-BUYIDLCC.js";import"./check-wh8Oepvp.js";import"./EmailPreviewModal-BTchg0kO.js";import"./badge-CGFh8DGq.js";import"./EmailTemplatePicker-B3rI3x5L.js";import"./popover-DsNWZLCi.js";import"./search-DJ1DqJUl.js";import"./list-Cl5pfbaH.js";import"./save-DPQEOg4B.js";import"./braces-B4a2Ghgm.js";import"./format-B2P09NY7.js";import"./en-US-COriuL8a.js";import"./differenceInCalendarDays-Bqg2ZgC5.js";import"./getTimezoneOffsetInMilliseconds-DaZTtZ3H.js";import"./crm-shortcodes-D-w6xNV3.js";import"./client-name-zfge3VH_.js";import"./currency-Bpf8_ITC.js";import"./date-utils-_xtJs2tX.js";import"./purify.es-mDO9dmX5.js";import"./use-upload-DeYJRo2D.js";import"./timeline-notes-DaCrStsk.js";import"./email-plain-text-hAD0xMT2.js";import"./heading-2-DIys_NOw.js";import"./link-B0u6d5KU.js";import"./text-align-start-BCn2GpSn.js";import"./image-C538Flpk.js";import"./upload-BvxlXvlm.js";import"./link-2-Czd80z1m.js";import"./paperclip-BZ9v3jFD.js";import"./undo-2-BISTJWF5.js";import"./circle-check-vKn0VvWh.js";import"./mouse-pointer-click-Dx-aGhjZ.js";import"./wand-sparkles-Bwbf1Sma.js";import"./index-D7pJbSr8.js";import"./index-DnHsgeAP.js";import"./chevron-up-BKNTUudS.js";import"./use-dismissed-hints-C5DtZfZV.js";import"./circle-question-mark-CP_yXdEO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0ccb255495e39d589ace3c3ce0094401fe4fff85"};var l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3cd40122-3e2c-4554-92b4-6df6a7156981",t._sentryDebugIdIdentifier="sentry-dbid-3cd40122-3e2c-4554-92b4-6df6a7156981")}catch{}})();const ot=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],dt=Re("rows-3",ot);function lt({members:t,weddingQueryParam:l}){const{toast:p}=z(),{selectedWeddingId:j}=Ue(),[d,s]=b.useState(!1),[o,r]=b.useState({email:!0,sms:!0}),[c,T]=b.useState(new Set),{data:E,isLoading:n}=ce({queryKey:["/api/wedding-day/settings"+l],enabled:d}),h=!!E?.shareToken,x=i=>o.email&&!!i.email||o.sms&&!!i.phone;b.useEffect(()=>{d&&T(new Set(t.filter(x).map(i=>i.id)))},[d,o.email,o.sms]);const w=Y({mutationFn:i=>J("POST",`/api/wedding-day/share-link/send${l}
2`,{contactIds:[],vendorIds:[],includeCouple:!1,extraEmails:[],partyMemberIds:i,channels:["sms"]}).then(f=>f.json()),onSuccess:i=>{const f=i.failures?.length||0;p({title:i.smsSent?`Sent ${i.smsSent} text${i.smsSent===1?"":"s"}`:"No texts sent",description:f>0?`${f} couldn't be reached.`:void 0,variant:f>0&&!i.smsSent?"destructive":void 0}),s(!1)},onError:i=>{p({title:"Couldnât send the texts",description:i.message,variant:"destructive"})}}),S=Xe({type:"command_center_invite",params:{weddingId:j??E?.weddingId??0,partyMemberIds:[...c].join(","),includeCouple:"false"},title:"Invite to Command Center",onSent:()=>{o.sms?w.mutate([...c]):s(!1)}}),y=w.isPending,u=t.filter(x).length;return e.jsxs(e.Fragment,{children:[e.jsxs(X,{open:d,onOpenChange:s,children:[e.jsx(Ee,{asChild:!0,children:e.jsxs(U,{variant:"outline",className:"tracking-wider uppercase text-xs","data-testid":"button-invite-party-cc",children:[e.jsx(Ze,{className:"w-4 h-4 mr-2"}),"Invite to Command Center"]})}),e.jsxs(Z,{className:"max-w-lg",children:[e.jsx(ee,{children:e.jsx(te,{className:"font-display",children:"Invite to Command Center"})}),n?e.jsx("p",{className:"text-sm text-muted-foreground py-6 text-center",children:"Loadingâ¦"}):h?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[e.jsx(Q,{checked:o.email,onCheckedChange:i=>r(f=>({...f,email:!!i})),"data-testid":"checkbox-invite-channel-email"}),e.jsx(me,{className:"w-3.5 h-3.5 text-muted-foreground"})," Email"]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[e.jsx(Q,{checked:o.sms,onCheckedChange:i=>r(f=>({...f,sms:!!i})),"data-testid":"checkbox-invite-channel-sms"}),e.jsx(ge,{className:"w-3.5 h-3.5 text-muted-foreground"})," Text"]})]}),u===0?e.jsxs("p",{className:"text-sm text-muted-foreground py-4 text-center border border-dashed border-border/40 rounded-md",children:["No party members have"," ",o.email&&o.sms?"an email or phone":o.email?"an email":"a phone"," yet. Add contact info on their profile first."]}):e.jsx("div",{className:"space-y-1 max-h-72 overflow-y-auto border border-border/30 rounded-md p-2",children:t.map(i=>{const f=x(i);return e.jsxs("label",{className:`flex items-start gap-2 p-2 rounded hover:bg-muted/30 cursor-pointer ${f?"":"opacity-50"}`,"data-testid":`row-invite-party-${i.id}`,children:[e.jsx(Q,{checked:c.has(i.id),disabled:!f,onCheckedChange:re=>T(q=>{const O=new Set(q);return re?O.add(i.id):O.delete(i.id),O}),className:"mt-0.5","data-testid":`checkbox-invite-party-${i.id}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-[13px] font-medium",children:i.name}),e.jsx("span",{className:"text-[11px] text-muted-foreground/70",children:i.role}),i.commandCenterEdit&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] tracking-[0.1em] uppercase text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-950/30 px-1.5 py-0.5 rounded",title:"Joins as a coordinator with live edit control",children:[e.jsx(et,{className:"w-2.5 h-2.5"})," Edit access"]})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-0.5 flex-wrap text-[11px]",children:[i.email?e.jsxs("span",{className:"text-foreground/70 flex items-center gap-1",children:[e.jsx(me,{className:"w-2.5 h-2.5"})," ",i.email]}):o.email?e.jsx("span",{className:"text-amber-600/70",children:"no email"}):null,i.phone?e.jsxs("span",{className:"text-foreground/70 flex items-center gap-1",children:[e.jsx(ge,{className:"w-2.5 h-2.5"})," ",i.phone]}):o.sms?e.jsx("span",{className:"text-amber-600/70",children:"no phone"}):null]})]})]},i.id)})}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[e.jsx(U,{variant:"outline",onClick:()=>s(!1),"data-testid":"button-cancel-invite-party",children:"Cancel"}),e.jsx(se,{type:"button",disabled:y||c.size===0||!o.email&&!o.sms,onClick:()=>{o.email?S.openPreview():w.mutate([...c])},"data-testid":"button-confirm-invite-party",children:y?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"w-3.5 h-3.5 mr-1.5 animate-spin"})," Sendingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(tt,{className:"w-3.5 h-3.5 mr-1.5"}),o.email?`Review email for ${c.size}`:`Text ${c.size}`]})})]})]}):e.jsxs("div",{className:"py-4 space-y-2",children:[e.jsx("p",{className:"text-sm text-foreground
2/80",children:"Set up your Wedding Day Command Center first, then you can invite your party from here."}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Open the Command Center from Day-of Contacts to turn it on and generate a share link."})]})]})]}),S.modal]})}const ct=["Maid of Honor","Best Man","Bridesmaid","Groomsman","Matron of Honor","Junior Bridesmaid","Junior Groomsman","Flower Girl","Ring Bearer","Usher","Personal Attendant","Other"],mt={name:"",role:"",side:"bride",bio:"",photoUrl:"",email:"",phone:"",commandCenterEdit:!1,order:0};function V(t){return t.split(" ").map(l=>l.charAt(0)).join("").toUpperCase().slice(0,2)}function pt(){return e.jsxs("div",{className:"space-y-8","data-testid":"loading-skeleton",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx(M,{className:"h-10 w-56 mx-auto rounded-md"}),e.jsx(M,{className:"h-4 w-80 mx-auto rounded-md"})]}),e.jsxs("div",{className:"flex justify-center gap-12",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx(M,{className:"w-24 h-24 rounded-full mx-auto"}),e.jsx(M,{className:"h-5 w-28 mx-auto rounded-md"}),e.jsx(M,{className:"h-3 w-40 mx-auto rounded-md"})]}),e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx(M,{className:"w-24 h-24 rounded-full mx-auto"}),e.jsx(M,{className:"h-5 w-28 mx-auto rounded-md"}),e.jsx(M,{className:"h-3 w-40 mx-auto rounded-md"})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(M,{className:"h-6 w-32 rounded-md"}),Array.from({length:3}).map((t,l)=>e.jsx(M,{className:"h-28 rounded-md"},l))]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(M,{className:"h-6 w-32 rounded-md"}),Array.from({length:3}).map((t,l)=>e.jsx(M,{className:"h-28 rounded-md"},l))]})]})]})}function Ce({currentUrl:t,onUpload:l,onRemove:p,onError:j,testIdPrefix:d}){const s=b.useRef(null),[o,r]=b.useState(!1),{toast:c}=z();async function T(E){const n=E.target.files?.[0];if(n)try{const{uploadImageToServer:h,validateFile:x}=await Te(async()=>{const{uploadImageToServer:y,validateFile:u}=await import("./use-upload-DeYJRo2D.js");return{uploadImageToServer:y,validateFile:u}},__vite__mapDeps([0,1,2,3])),w=x(n,{accept:"image"});if(w){j?.(w),s.current&&(s.current.value="");return}r(!0);const S=await h(n,"avatar");if("error"in S){j?.(S.error);return}S.resizedNotice&&c(S.resizedNotice),l(S.objectPath)}catch{j?.("Photo upload failed. Please try again.")}finally{r(!1),s.current&&(s.current.value="")}}return e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(L,{className:"w-24 h-24 shrink-0","data-testid":`avatar-${d}`,children:[t&&e.jsx($,{src:R(t,"thumbnail"),alt:"Photo"}),e.jsx(A,{className:"bg-primary/10 text-primary",children:e.jsx(ae,{className:"w-8 h-8"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:s,type:"file",accept:"image/*",className:"hidden",onChange:T,"data-testid":`input-${d}-photo`}),e.jsxs(U,{type:"button",variant:"outline",className:"tracking-wider uppercase text-xs",onClick:()=>s.current?.click(),disabled:o,"data-testid":`button-upload-${d}-photo`,children:[e.jsx(ae,{className:"w-3 h-3 mr-1"}),o?"...":"Upload"]}),t&&e.jsx(U,{type:"button",size:"icon","aria-label":"Remove photo",variant:"ghost",onClick:p,"data-testid":`button-remove-${d}-photo`,children:e.jsx(Me,{className:"w-4 h-4"})})]})]})}function xt({details:t,weddingQueryParam:l,open:p,onOpenChange:j}){const{toast:d}=z(),s=Ie({defaultValues:{partner1Name:t?.partner1Name||"",partner1Bio:t?.partner1Bio||"",partner1PhotoUrl:t?.partner1PhotoUrl||"",partner2Name:t?.partner2Name||"",partner2Bio:t?.partner2Bio||"",partner2PhotoUrl:t?.partner2PhotoUrl||"",howWeMet:t?.howWeMet||"",theProposal:t?.theProposal||"",ourLoveStory:t?.ourLoveStory||""}});b.useEffect(()=>{p&&t&&s.reset({partner1Name:t.partner1Name||"",partner1Bio:t.partner1Bio||"",partner1PhotoUrl:t.partner1PhotoUrl||"",partner2Name:t.partner2Name||"",partner2Bio:t.partner2Bio||"",partner2PhotoUrl:t.partner2PhotoUrl||"",howWeMet:t.howWeMet||"",theProposal:t.theProposal||"",ourLoveStory:t.ourLoveStory||""})},[t,s,p]);const o=Y({mutationFn:r=>J("POST","/api/wedding-details"+l,r),onSuccess:()=>{W.refetchQueries({queryKey:["/api/wedding-details"+l]}),j(!1),d({title:"Story saved",description:"Your love story has been updated."})},onError:r=>{pe(s,r)||d({title:"Couldnât complete that",description:r.message,variant:"destructive"})}});return e.jsx(X,{open:p,onOpenChange:j,children:e.jsxs(Z,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[e.jsx(ee,{children:e.jsx(te,{className:"font-display text-xl",children:"Edit Our Story"})}),e.jsx(Le,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(r=>o.mutate(r)),className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground font-semibold",children:"Partner 1"}),e.jsx(Ce,{currentUrl:s.watch("partner1PhotoUrl"),onUpload:r=>s.setValue("partner1PhotoUrl",r),onRemove:()=>s.setValue("partner1PhotoUrl",""),onError:r=>d({title:"Upload Error",description:r,variant:"destructive"}),testIdPrefix:"partner1"}),e.jsx(g,{control:s.control,name:"partner1Name",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"Name"}),e.jsx(P,{children:e.jsx(_,{placeholder:"First name",...r,"data-testid":"input-partner1-name"})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"partner1Bio",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"About"}),e.jsx(P,{children:e.jsx(D,{placeholder:"A little about them...",...r,"data-testid":"input-partner1-bio"})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(F,{field:"partner1Bio",currentText:r.value,context:{partnerName:s.watch("partner1Name")},onTextGenerated:c=>s.setValue("partner1Bio",c,{shouldDirty:!0})})}),e.jsx(N,{})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground font-semibold",children:"Partner 2"}),e.jsx(Ce,{currentUrl:s.watch("partner2PhotoUrl"),onUpload:r=>s.setValue("partner2PhotoUrl",r),onRemove:()=>s.setValue("partner2PhotoUrl",""),onError:r=>d({title:"Upload Error",description:r,variant:"destructive"}),testIdPrefix:"partner2"}),e.jsx(g,{control:s.control,name:"partner2Name",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"Name"}),e.jsx(P,{children:e.jsx(_,{placeholder:"First name",...r,"data-testid":"input-partner2-name"})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"partner2Bio",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"About"}),e.jsx(P,{children:e.jsx(D,{placeholder:"A little about them...",...r,"data-testid":"input-partner2-bio"})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(F,{field:"partner2Bio",currentText:r.value,context:{partnerName:s.watch("partner2Name")},onTextGenerated:c=>s.setValue("partner2Bio",c,{shouldDirty:!0})})}),e.jsx(N,{})]})})]})]}),e.jsxs("div",{className:"border-t pt-6 space-y-4",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground font-semibold",children:"Your Love Story"}),e.jsx(g,{control:s.control,name:"howWeMet",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"How We Met"}),e.jsx(P,{children:e.jsx(D,{placeholder:"Tell the story of how you first crossed paths...",className:"min-h-[100px]",...r,"data-testid":"input-how-we-met"})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(F,{field:"howWeMet",currentText:r.value,onTextGenerated:c=>s.setValue("howWeMet",c,{shouldDirty:!0})})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"theProposal",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"The Proposal"}),e.jsx(P,{children:e.jsx(D,{placeholder:"How did the proposal happen...",className:"min-h-[100px]",...r,"data-testid":"input-the-proposal"})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(F,{field:"theProposal",currentText:r.value,onTextGenerated:c=>s.setValue("theProposal",c,{shouldDirty:!0})})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"ourLoveStory",render:({field:r})=>e.jsxs(v,{children:[e.jsx(C,{children:"Our Love Story"}),e.jsx(P,{children:e.jsx(D,{placeholder:"Share anything else about your journey together...",className:"min-h-[100px]",...r,"data-testid":"input-our-love-story"})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(F,{field:"ourLoveStory",currentText:r.value,onTextGenerated:c=>s.setValue("ourLoveStory",c,{shouldDirty:!0})})}),e.jsx(N,{})]})})]}),e.jsxs(se,{type:"submit",disabled:o.isPending,className:"w-full","data-testid":"button-save-story",children:[o.isPending&&e.jsx(ue,{className:"w-4 h-4 mr-2 animate-spin"}),"Save Story"]})]})})]})})}function ht({details:t,isCouple:l,onEdit:p}){const j=t?.partner1Name||t?.partner2Name,d=t?.howWeMet||t?.theProposal||t?.ourLoveStory,s=j||d;return!s&&!l?null:e.jsxs(k.div,{initial:{opacity:0,y:15}
2,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-8","data-testid":"section-our-story",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsx("h2",{className:"font-display text-2xl font-normal text-foreground","data-testid":"text-our-story-title",children:"Our Story"}),l&&e.jsxs(U,{variant:"outline",className:"tracking-wider uppercase text-xs",onClick:p,"data-testid":"button-edit-story",children:[e.jsx(Se,{className:"w-4 h-4 mr-2"}),s?"Edit Story":"Tell Your Story"]})]}),!s&&l?e.jsx(ze,{className:"border-dashed",children:e.jsx(K,{icon:nt,title:"Share your love story",description:"Add your names, photos, and the story of how you met, your proposal, and your journey together.",primaryAction:{label:"Get Started",icon:Se,onClick:p,testId:"button-start-story"},testId:"empty-story-state"})}):s?e.jsxs("div",{className:"space-y-8",children:[j&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-8 sm:gap-12","data-testid":"section-couple-profiles",children:[t?.partner1Name&&e.jsxs(k.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.4,delay:.1},className:"text-center max-w-[200px]","data-testid":"profile-partner1",children:[e.jsxs(L,{className:"w-28 h-28 mx-auto mb-3","data-testid":"avatar-partner1",children:[t.partner1PhotoUrl&&e.jsx($,{src:R(t.partner1PhotoUrl,"thumbnail"),alt:t.partner1Name}),e.jsx(A,{className:"bg-primary/10 text-primary font-display text-2xl font-normal",children:V(t.partner1Name)})]}),e.jsx("h3",{className:"font-display text-xl font-normal text-foreground","data-testid":"text-partner1-name",children:t.partner1Name}),t.partner1Bio&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed","data-testid":"text-partner1-bio",children:t.partner1Bio})]}),t?.partner1Name&&t?.partner2Name&&e.jsx(k.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.2},className:"hidden sm:flex",children:e.jsx("span",{className:"font-display text-2xl text-muted-foreground/70 italic",children:"&"})}),t?.partner2Name&&e.jsxs(k.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},transition:{duration:.4,delay:.3},className:"text-center max-w-[200px]","data-testid":"profile-partner2",children:[e.jsxs(L,{className:"w-28 h-28 mx-auto mb-3","data-testid":"avatar-partner2",children:[t.partner2PhotoUrl&&e.jsx($,{src:R(t.partner2PhotoUrl,"thumbnail"),alt:t.partner2Name}),e.jsx(A,{className:"bg-primary/10 text-primary font-display text-2xl font-normal",children:V(t.partner2Name)})]}),e.jsx("h3",{className:"font-display text-xl font-normal text-foreground","data-testid":"text-partner2-name",children:t.partner2Name}),t.partner2Bio&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed","data-testid":"text-partner2-bio",children:t.partner2Bio})]})]}),d&&e.jsxs("div",{className:"space-y-8","data-testid":"section-love-story",children:[t?.howWeMet&&e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,delay:.2},"data-testid":"card-how-we-met",children:[e.jsx("h3",{className:"font-display text-lg font-normal text-foreground mb-2",children:"How We Met"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line","data-testid":"text-how-we-met",children:t.howWeMet})]}),t?.theProposal&&e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,delay:.3},"data-testid":"card-the-proposal",children:[e.jsx("h3",{className:"font-display text-lg font-normal text-foreground mb-2",children:"The Proposal"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line","data-testid":"text-the-proposal",children:t.theProposal})]}),t?.ourLoveStory&&e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,delay:.4},"data-testid":"card-our-love-story",children:[e.jsx("h3",{className:"font-display text-lg font-normal text-foreground mb-2",children:"Our Love Story"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line","data-testid":"text-our-love-story",children:t.ourLoveStory})]})]})]}):null]})}function Pe({defaultValues:t,onSubmit:l,isPending:p,submitLabel:j}){const{toast:d}=z(),s=Ie({defaultValues:t}),o=s.watch("photoUrl"),r=b.useRef(null),[c,T]=b.useState(!1);async function E(n){const h=n.target.files?.[0];if(!h)return;const{uploadImageToServer:x,validateFile:w}=await Te(async()=>{const{uploadImageToServer:y,validateFile:u}=await import("./use-upload-DeYJRo2D.js");return{uploadImageToServer:y,validateFile:u}},__vite__mapDeps([0,1,2,3])),S=w(h,{accept:"image"});if(S){d({title:"Upload Error",description:S,variant:"destructive"}),r.current&&(r.current.value="");return}T(!0);try{const y=await x(h,"avatar");if("error"in y){d({title:"Photo upload failed",description:y.error,variant:"destructive"});return}y.resizedNotice&&d(y.resizedNotice),s.setValue("photoUrl",y.objectPath)}catch(y){d({title:"Photo upload failed",description:qe(y)||"We c
2ouldn't upload that photo. Please try again.",variant:"destructive"})}finally{T(!1),r.current&&(r.current.value="")}}return e.jsx(Le,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(n=>l(n,s)),className:"space-y-4",children:[e.jsx(g,{control:s.control,name:"photoUrl",render:()=>e.jsxs(v,{children:[e.jsx(C,{children:"Photo"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(L,{className:"w-16 h-16 shrink-0","data-testid":"avatar-member-preview",children:[o&&e.jsx($,{src:R(o,"thumbnail"),alt:"Preview"}),e.jsx(A,{className:"bg-primary/10 text-primary",children:e.jsx(ae,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:r,type:"file",accept:"image/*",className:"hidden",onChange:E,"data-testid":"input-member-photo"}),e.jsxs(U,{type:"button",variant:"outline",className:"tracking-wider uppercase text-xs",onClick:()=>r.current?.click(),disabled:c,"data-testid":"button-upload-member-photo",children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),c?"Uploading...":"Upload Photo"]}),o&&e.jsx(U,{type:"button",size:"icon","aria-label":"Remove photo",variant:"ghost",onClick:()=>s.setValue("photoUrl",""),"data-testid":"button-remove-member-photo",children:e.jsx(Me,{className:"w-4 h-4"})})]})]}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"name",rules:{required:"Name is required"},render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Name"}),e.jsx(P,{children:e.jsx(_,{placeholder:"Full name",...n,"data-testid":"input-member-name"})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"role",rules:{required:"Role is required"},render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Role"}),e.jsxs(ve,{onValueChange:n.onChange,defaultValue:n.value,children:[e.jsx(P,{children:e.jsx(Ne,{"data-testid":"select-member-role",children:e.jsx(be,{placeholder:"Select a role"})})}),e.jsx(we,{children:ct.map(h=>e.jsx(le,{value:h,"data-testid":`option-role-${h.toLowerCase().replace(/[^a-z]/g,"-")}`,children:h},h))})]}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"side",rules:{required:"Side is required"},render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Side"}),e.jsxs(ve,{onValueChange:n.onChange,defaultValue:n.value,children:[e.jsx(P,{children:e.jsx(Ne,{"data-testid":"select-member-side",children:e.jsx(be,{placeholder:"Select a side"})})}),e.jsxs(we,{children:[e.jsx(le,{value:"bride","data-testid":"option-side-bride",children:"Bride's Side"}),e.jsx(le,{value:"groom","data-testid":"option-side-groom",children:"Groom's Side"})]})]}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"email",render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Email"}),e.jsx(P,{children:e.jsx(_,{type:"email",placeholder:"[email protected]",...n,"data-testid":"input-member-email"})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"phone",render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Phone"}),e.jsx(P,{children:e.jsx(Je,{value:n.value,onChange:n.onChange,"data-testid":"input-member-phone"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Used to invite them to the wedding day Command Center."}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"commandCenterEdit",render:({field:n})=>e.jsxs(v,{children:[e.jsxs("label",{className:"flex items-start gap-2.5 cursor-pointer",children:[e.jsx(P,{children:e.jsx(Q,{checked:n.value,onCheckedChange:n.onChange,className:"mt-0.5","data-testid":"checkbox-member-cc-edit"})}),e.jsxs("span",{className:"text-sm leading-snug",children:["Give live edit control in the Command Center",e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Off = view-only. On lets them update statuses and times on the day (requires a phone number)."})]})]}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"bio",render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Bio"}),e.jsx(P,{children:e.jsx(D,{placeholder:"A short bio or fun fact...",...n,"data-testid":"input-member-bio"})}),e.jsx(N,{})]})}),e.jsx(g,{control:s.control,name:"order",render:({field:n})=>e.jsxs(v,{children:[e.jsx(C,{children:"Display Order"}),e.jsx(P,{children:e.jsx(_,{type:"number",placeholder:"0",...n,onChange:h=>n.onChange(Number(h.target.value)),"data-testid":"input-member-order"})}),e.jsx(N,{})]})}),e.jsxs(se,{type:"submit",disabled:p,className:"w-full","data-testid":"button-submit-member",children:[p&&e.jsx(ue,{className:"w-4 h-4 mr-2 animate-spin"}),j]})]})})}function ke({member:t,isCouple:l,onEdit:p,onDelete:j,isDeleting:d}){return e.jsx(k.div,{initial:{opacity:0,y:10}
2,animate:{opacity:1,y:0},transition:{duration:.3},children:e.jsxs("div",{className:"flex items-start gap-4 py-4","data-testid":`card-member-${t.id}`,children:[e.jsxs(L,{className:"w-12 h-12 shrink-0","data-testid":`avatar-member-${t.id}`,children:[t.photoUrl&&e.jsx($,{src:R(t.photoUrl,"thumbnail"),alt:t.name}),e.jsx(A,{className:"bg-primary/10 text-primary font-display font-normal text-sm",children:V(t.name)})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-display text-base font-normal text-foreground truncate","data-testid":`text-member-name-${t.id}`,children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5","data-testid":`badge-member-role-${t.id}`,children:t.role}),t.email&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5 flex items-center gap-1","data-testid":`text-member-email-${t.id}`,children:[e.jsx(me,{className:"w-3 h-3"})," ",t.email]}),t.bio&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1.5 leading-relaxed","data-testid":`text-member-bio-${t.id}`,children:t.bio})]}),l&&e.jsxs("div",{className:"flex gap-1 shrink-0",style:{visibility:"visible"},children:[e.jsx(U,{size:"icon","aria-label":"Edit",variant:"ghost",onClick:()=>p(t),"data-testid":`button-edit-member-${t.id}`,children:e.jsx(xe,{className:"w-4 h-4"})}),e.jsx(U,{size:"icon","aria-label":"Delete",variant:"ghost",onClick:()=>j(t.id),disabled:d,"data-testid":`button-delete-member-${t.id}`,children:e.jsx(he,{className:"w-4 h-4"})})]})]})})}function Oa(){const{toast:t}=z();Be();const{data:l}=De(),{effectiveRole:p}=Ke(),j=p||"",{canEdit:d}=Qe("wedding-party"),s=Ve(j)&&d,{isPreviewActive:o}=Oe(),[r,c]=b.useState(!1),[T,E]=b.useState(!1),[n,h]=b.useState(!1),[x,w]=b.useState(null),[S,y]=b.useState(()=>typeof window<"u"&&localStorage.getItem("colara-party-layout")||"columns"),{weddingQueryParam:u,selectedWeddingId:i}=Ue();He("wedding-party",i);const{data:f,isLoading:re}=ce({queryKey:["/api/wedding-party"+u]}),{data:q,isLoading:O}=ce({queryKey:["/api/wedding-details"+u]}),B=b.useRef(null),je=b.useRef(null),ye=Y({mutationFn:async a=>await(await J("POST","/api/wedding-party"+u,{name:a.name,role:a.role,side:a.side,bio:a.bio||void 0,photoUrl:a.photoUrl||void 0,email:a.email||void 0,phone:a.phone||void 0,commandCenterEdit:a.commandCenterEdit,order:a.order||0})).json(),onSuccess:a=>{W.setQueryData(["/api/wedding-party"+u],m=>m?[...m,a]:[a]),W.invalidateQueries({queryKey:["/api/wedding-party"+u]}),c(!1),t({title:"Member added",description:"The wedding party member has been added."}),setTimeout(()=>je.current?.scrollIntoView({behavior:"smooth",block:"start"}),150)},onError:a=>{B.current&&pe(B.current,a)||t({title:"Couldnât complete that",description:a.message,variant:"destructive"})}}),fe=Y({mutationFn:async a=>await(await J("PUT",`/api/wedding-party/${a.id}`+u,{name:a.name,role:a.role,side:a.side,bio:a.bio||null,photoUrl:a.photoUrl||null,email:a.email||null,phone:a.phone||null,commandCenterEdit:a.commandCenterEdit,order:a.order||0})).json(),onSuccess:(a,m)=>{W.setQueryData(["/api/wedding-party"+u],oe=>oe&&oe.map(de=>de.id===m.id?{...de,...a}:de)),W.invalidateQueries({queryKey:["/api/wedding-party"+u]}),E(!1),w(null),t({title:"Member updated",description:"Changes have been saved."})},onError:a=>{B.current&&pe(B.current,a)||t({title:"Couldnât complete that",description:a.message,variant:"destructive"})}}),{deleteWithUndo:$e}=Ge({endpoint:"/api/wedding-party",queryKeys:["/api/wedding-party"+u],itemLabel:"Wedding party member",urlSuffix:u,optimisticRemove:!0}),I={mutate:$e,isPending:!1},Ae=re||O,ie=[...f||[]].sort((a,m)=>a.order-m.order||a.id-m.id),G=ie.filter(a=>a.side==="bride"),H=ie.filter(a=>a.side==="groom");if(Ae)return e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8",children:e.jsx(pt,{})});const ne=!f||f.length===0;return e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-8 space-y-10",children:[e.jsx(Ye,{pageKey:"wedding-party"}),e.jsx(at,{title:"What is this?",description:"Introduce your wedding party to the world! Add each member with their role, photo, and a personal note. This info can appear on your wedding website so guests know who's who.",guideSlug:"wedding-party",storageKey:"wedding-party",steps:["Click 'Add Member' to add a bridesmaid, groomsman, or other role.","Upload a photo and write a short bio for each person.","Edit your love story to share how you met and your proposal story."]}),e.jsx(k.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.5},children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[11px] tracking-[0.3em] uppercase text-muted-foreground/70 mb-3",children:"Meet the"}),e.jsx("h1",{className:"font-display text-3xl font-light tracking-tight text-foreground","data-testid":"text-page-title",children:"Wedding Party"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2 leading-relaxed","data-testid":"text-page-subtitle",children:"The special people who are part of our love story"})]})}),s&&!o&&e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,delay:.2},className:"bg-primary/5 border border-primary/10 rounded-xl px-5 py-4","data-testid":"tip-wedding-party",children:[e.jsx("p",{className:"text-sm text-foreground/80 font-medium mb-2.5",children:"Build your wedding party to:"}),e.jsxs("div",{className:"grid sm:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(st,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Arrange them on your floor plan and seating chart"})]}),e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Fe,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Email them timelines, venue details, and instructions"})]}),e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(We,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Share your love story and showcase your closest people"})]})]})]}),e.jsx(ht,{details:q||null,isCouple:s,onEdit:()=>h(!0)}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{ref:je,className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h2",{className:"font-display text-2xl font-normal text-foreground","data-testid":"text-party-title",children:"The Party"}),!ne&&e.jsxs("div",{className:"flex items-center border border-border rounded-lg overflow-hidden","data-testid":"party-layout-toggle",children:[e.jsx(U,{size:"sm",variant:"ghost",className:`h-7 px-2 rounded-none ${S==="columns"?"bg-primary/10 text-primary":"text-muted-foreground"}`,onClick:()=>{y("columns"),localStorage.setItem("colara-party-layout","columns")},"data-testid":"button-layout-columns","aria-label":"Column layout",children:e.jsx(rt,{className:"w-3.5 h-3.5"})}),e.jsx(U,{size:"sm",variant:"ghost",className:`h-7 px-2 rounded-none ${S==="rows"?"bg-primary/10 text-primary":"text-muted-foreground"}`,onClick:()=>{y("rows"),localStorage.setItem("colara-party-layout","rows")},"data-testid":"button-layout-rows","aria-label":"Row layout",children:e.jsx(dt,{className:"w-3.5 h-3.5"})})]})]}),s&&e.jsxs("div",{className:"flex items-center gap-2",children:[!ne&&e.jsx(lt,{members:ie,weddingQueryParam:u}),e.jsxs(X,{open:r,onOpenChange:c,children:[e.jsx(Ee,{asChild:!0,children:e.jsxs(se,{className:"tracking-wider uppercase","data-testid":"button-add-member",children:[e.jsx(it,{className:"w-4 h-4 mr-2"}),"Add Member"]})}),e.jsxs(Z,{className:"max-h-[85vh] overflow-y-auto",children:[e.jsx(ee,{children:e.jsx(te,{className:"font-display",children:"Add Wedding Party Member"})}),e.jsx(Pe,{defaultValues:mt,onSubmit:(a,m)=>{B.current=m,ye.mutate(a)},isPending:ye.isPending,submitLabel:"Add Member"})]})]})]})]}),ne?e.jsx(K,{icon:_e,title:"Your wedding party, all in one place",description:s?"Add your bridesmaids, groomsmen, and key people â track roles, contact info, outfits, and keep everyone coordinated.":"The wedding party details will appear here once the couple adds their people.",testId:"empty-state"}):S==="rows"?e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},className:"space-y-8","data-testid":"party-rows-layout",children:[G.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground","data-testid":"text-bride-side-title",children:"Bride's Side"}),e.jsx("div",{className:"flex flex-wrap gap-6 justify-center",children:G.map(a=>e.jsxs(k.div,{initial:{opacity:0,scale:.95}
2,animate:{opacity:1,scale:1},transition:{duration:.3},className:"flex flex-col items-center text-center w-28 group relative","data-testid":`card-member-${a.id}`,children:[e.jsxs(L,{className:"w-16 h-16 mb-2","data-testid":`avatar-member-${a.id}`,children:[a.photoUrl&&e.jsx($,{src:R(a.photoUrl,"thumbnail"),alt:a.name}),e.jsx(A,{className:"bg-primary/10 text-primary font-display font-normal text-sm",children:V(a.name)})]}),e.jsx("p",{className:"font-display text-sm font-normal text-foreground leading-tight","data-testid":`text-member-name-${a.id}`,children:a.name}),e.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5","data-testid":`badge-member-role-${a.id}`,children:a.role}),s&&e.jsxs("div",{className:"flex gap-0.5 mt-1",children:[e.jsx(U,{size:"icon","aria-label":"Edit",variant:"ghost",className:"h-6 w-6",onClick:()=>{w(a),E(!0)},"data-testid":`button-edit-member-${a.id}`,children:e.jsx(xe,{className:"w-3 h-3"})}),e.jsx(U,{size:"icon","aria-label":"Delete",variant:"ghost",className:"h-6 w-6",onClick:()=>I.mutate(a.id),disabled:I.isPending,"data-testid":`button-delete-member-${a.id}`,children:e.jsx(he,{className:"w-3 h-3"})})]})]},a.id))})]}),H.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground","data-testid":"text-groom-side-title",children:"Groom's Side"}),e.jsx("div",{className:"flex flex-wrap gap-6 justify-center",children:H.map(a=>e.jsxs(k.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3},className:"flex flex-col items-center text-center w-28 group relative","data-testid":`card-member-${a.id}`,children:[e.jsxs(L,{className:"w-16 h-16 mb-2","data-testid":`avatar-member-${a.id}`,children:[a.photoUrl&&e.jsx($,{src:R(a.photoUrl,"thumbnail"),alt:a.name}),e.jsx(A,{className:"bg-primary/10 text-primary font-display font-normal text-sm",children:V(a.name)})]}),e.jsx("p",{className:"font-display text-sm font-normal text-foreground leading-tight","data-testid":`text-member-name-${a.id}`,children:a.name}),e.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5","data-testid":`badge-member-role-${a.id}`,children:a.role}),s&&e.jsxs("div",{className:"flex gap-0.5 mt-1",children:[e.jsx(U,{size:"icon","aria-label":"Edit",variant:"ghost",className:"h-6 w-6",onClick:()=>{w(a),E(!0)},"data-testid":`button-edit-member-${a.id}`,children:e.jsx(xe,{className:"w-3 h-3"})}),e.jsx(U,{size:"icon","aria-label":"Delete",variant:"ghost",className:"h-6 w-6",onClick:()=>I.mutate(a.id),disabled:I.isPending,"data-testid":`button-delete-member-${a.id}`,children:e.jsx(he,{className:"w-3 h-3"})})]})]},a.id))})]})]}):e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs(k.div,{initial:{opacity:0,x:-15},animate:{opacity:1,x:0},transition:{duration:.5,delay:.1},className:"space-y-4",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground mb-2","data-testid":"text-bride-side-title",children:"Bride's Side"}),G.length===0?e.jsx(K,{variant:"compact",title:"Add bridesmaids, maid of honor, and more",testId:"text-bride-side-empty",className:"py-6"}):e.jsx("div",{className:"divide-y divide-border",children:G.map(a=>e.jsx(ke,{member:a,isCouple:s,onEdit:m=>{w(m),E(!0)},onDelete:m=>I.mutate(m),isDeleting:I.isPending},a.id))})]}),e.jsxs(k.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},className:"space-y-4",children:[e.jsx("p",{className:"text-xs tracking-[0.2em] uppercase text-muted-foreground mb-2","data-testid":"text-groom-side-title",children:"Groom's Side"}),H.length===0?e.jsx(K,{variant:"compact",title:"Add groomsmen, best man, and more",testId:"text-groom-side-empty",className:"py-6"}):e.jsx("div",{className:"divide-y divide-border",children:H.map(a=>e.jsx(ke,{member:a,isCouple:s,onEdit:m=>{w(m),E(!0)},onDelete:m=>I.mutate(m),isDeleting:I.isPending},a.id))})]})]})]}),e.jsx(X,{open:T,onOpenChange:a=>{E(a),a||w(null)},children:e.jsxs(Z,{className:"max-h-[85vh] overflow-y-auto",children:[e.jsx(ee,{children:e.jsx(te,{className:"font-display",children:"Edit Member"})}),x&&e.jsx(Pe,{defaultValues:{name:x.name,role:x.role,side:x.side,bio:x.bio||"",photoUrl:x.photoUrl||"",email:x.email||"",phone:x.phone||"",commandCenterEdit:!!x.commandCenterEdit,order:x.order},onSubmit:(a,m)=>{B.current=m,fe.mutate({...a,id:x.id})},isPending:fe.isPending,submitLabel:"Save Changes"})]})}),e.jsx(xt,{details:q||null,weddingQueryParam:u,open:n,onOpenChange:h})]})}export{Oa 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.