1import{r as v,j as e}from"./vendor-C_lr6Peh.js";import{a as ge}from"./date-utils-_xtJs2tX.js";import{m as _}from"./mutation-error-toast-BVHxsHd8.js";import{q,C as M,v as W,W as Se,aO as Te,F as ve,M as L,B as $,h as b,N as Ze,a as Xe,ab as Qe,U as qe,aB as Le,ad as ze,K as je,Q as P,I as F,P as R,k as et,D as We,Z as re,$ as oe,a0 as ie,a1 as de,L as ye,c as De,a5 as Q,a7 as tt,aZ as st,u as at,H as nt,ac as rt,dG as ot,a3 as it,au as dt}from"./index-CCfJC9m9.js";import{a as xe,P as Ue}from"./PageSkeleton-BeEnqj1m.js";import{u as lt}from"./use-ensure-wedding-id-url-DTATJK2g.js";import{u as Ge}from"./use-page-edit-permission-D3mzUeA_.js";import{a as ct}from"./vendor-category-JqkbQTEb.js";import{V as mt}from"./VendorCategoryOptions-13iA5Yru.js";import{a as pt}from"./ShareWeddingDialog-DSEXgO-1.js";import{E as le}from"./empty-state-4a14WMSj.js";import{B as Ve}from"./badge-CGFh8DGq.js";import{I as V}from"./input-BhU9ByXS.js";import{T as Ie}from"./textarea-DPKXeB9F.js";import{A as ut}from"./AiWritingAssist-COWhiWSj.js";import{A as Oe,a as Pe,b as $e}from"./avatar-CaPyXZ9X.js";import{g as Ee}from"./image-utils-BMXESF92.js";import{C as Be}from"./clock-NeT8qJCP.js";import{C as He}from"./circle-check-vKn0VvWh.js";import{P as fe}from"./paperclip-BZ9v3jFD.js";import{S as G,a as B,b as H,c as Y,d as A}from"./select-BK7nL9Mt.js";import{T as ht,a as xt,b as ae,c as ne}from"./tabs-DmJcUjPJ.js";import{L as O}from"./label-Dpeci-J4.js";import{D as ft,a as gt,b as vt,c as Ce}from"./dropdown-menu-CrqGqHT1.js";import{P as jt}from"./PageHelper-BeU7BH7D.js";import{V as pe}from"./VendorsSubNav-CdwdB8gH.js";import{u as yt,F as bt}from"./FreePlanUpgradeGate-B-CGkvgY.js";import{ContactForm as Nt}from"./DayOfContacts-ZvL2uptv.js";import{a as wt,i as Ct}from"./use-vendors-zD42UYUn.js";import{P as kt}from"./PreferredVendorPicker-C5Dv3gQE.js";import{T as ke,c as _e}from"./Messages-mg9WeF6A.js";import{m as St}from"./framer-motion-BelE6YLj.js";import{F as ue}from"./folder-open-BbrYZYiv.js";import{P as Tt}from"./plus-Cx32ukVL.js";import{E as Ft}from"./ellipsis-CKjbNQjQ.js";import{S as At}from"./share-2-XFGRTOtq.js";import{P as Dt}from"./printer-CXKKZCaO.js";import{S as he}from"./star-Bxv7pWmt.js";import{S as Fe}from"./send-Dla22FU7.js";import{U as It}from"./upload-BvxlXvlm.js";import{C as Ae}from"./chevron-right-C6nWXIh2.js";import{U as Ye}from"./user-D_ZskT7V.js";import{S as Ot}from"./store--ItSnWEF.js";import{T as Me}from"./trash-2-q_yUbozN.js";import{P as Pt}from"./phone-Ckh7eGy7.js";import{P as $t}from"./pen-CFaetubi.js";import{C as Et}from"./circle-question-mark-CP_yXdEO.js";import{C as Mt}from"./circle-x-DBTlg3ix.js";import"./skeleton-D19tAbGf.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"./use-debounced-value-CgdMo8Cf.js";import"./wand-sparkles-Bwbf1Sma.js";import"./index-D7pJbSr8.js";import"./index-DnHsgeAP.js";import"./check-wh8Oepvp.js";import"./chevron-up-BKNTUudS.js";import"./index-6nj-CStY.js";import"./circle-DD1ufIjP.js";import"./use-dismissed-hints-C5DtZfZV.js";import"./use-nav-items-D86aGug9.js";import"./sidebar-personalization-mYPet3Ij.js";import"./use-visibility-VxE3TGVP.js";import"./routes-DbsrLclN.js";import"./quickbooks-sync-D6X-QmxL.js";import"./installment-anchors-Cr-Po_eo.js";import"./wedding-website-portrait-CB-r_WFC.js";import"./guide-steps-DD0RE40u.js";import"./guide-state-CK1Ttg67.js";import"./ticket-g3gCK6Sk.js";import"./bell-dot-CM47dVHQ.js";import"./palette-BuLc07rI.js";import"./armchair-CIJxRY93.js";import"./map-pin-wEsb6qZq.js";import"./dollar-sign-CcvKpShs.js";import"./handshake-i7zrTyHY.js";import"./globe-DgnBOuPk.js";import"./frame-pfh-oA4E.js";import"./party-popper-DESjsxcT.js";import"./gift-D-fgjl6H.js";import"./utensils-crossed-DyfXrX8F.js";import"./calendar-check-DfQs7Sww.js";import"./user-check-tsK1HA9a.js";import"./calendar-DTAYBCHu.js";import"./camera-BcpTBW_k.js";import"./image-C538Flpk.js";import"./package-CvxxgRqb.js";import"./clipboard-list-D4d8SG2B.js";import"./layers-PP9L_BkT.js";import"./bot-DvuyUwNb.js";import"./briefcase-BtipMDIS.js";import"./notebook-pen-D1ORqWjn.js";import"./inbox-Di6y8Jni.js";import"./workflow-7IwvQk-T.js";import"./megaphone-SeIGmj0S.js";import"./layout-grid-DxSSbb99.js";import"./layout-template-VYqLXI2B.js";import"./radio-DlQPLcqh.js";import"./library-B48hL5kP.js";import"./shield-fM65dRXI.js";import"./compass-rOb9sQb-.js";import"./TabStripSkeleton-whaYmXBt.js";import"./mobile-section-select-BVQjtzqb.js";import"./lock-BUYIDLCC.js";import"./form-CYsqUbIu.js";import"./use-undo-delete-4AP6DROQ.js";import"./useSendEmail-L-XakTDj.js";import"./EmailPreviewModal-BTchg0kO.js";import"./checkbox-Cw1ErITi.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"./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"./link-2-Czd80z1m.js";import"./undo-2-BISTJWF5.js";import"./pen-line-CRWb5ajB.js";import"./mouse-pointer-click-Dx-aGhjZ.js";import"./CountryCodeSelect-DbhepcJ0.js";import"./CommandCenterAutoAccessSettings-DnfDFZWF.js";import"./switch-Dsti7IIC.js";import"./message-circle-2x_KEjIU.js";import"./eye-off-QbwkCQI6.js";import"./copy-BBUkuAem.js";import"./truck-qJQV1qex.js";import"./useInfiniteQuery-tm0uiy_y.js";import"./HelpTooltip-Cwvf5xLR.js";import"./ReadOnlyBanner-BfNf6yAj.js";import"./use-signature-prefill-w4vQRHn1.js";import"./html-text-nuc7F1He.js";import"./use-prepend-scroll-C6gk3kTg.js";import"./calendar-heart-oc0p43ya.js";import"./zap-CP_9R3DG.js";import"./info-CJpNYAZX.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"0ccb255495e39d589ace3c3ce0094401fe4fff85"};var i=new d.Error().stack;i&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[i]="6890db6b-3e62-4e1f-82d9-01c6cd2afa54",d._sentryDebugIdIdentifier="sentry-dbid-6890db6b-3e62-4e1f-82d9-01c6cd2afa54")}catch{}})();const qt=["Family","Friend","Bridal Party","Groom's Party","Officiant","Coordinator","Other"],Re={file_shared:{icon:fe,className:"bg-blue-100 text-blue-600 dar
1k:bg-blue-900/30 dark:text-blue-400"},comment_added:{icon:L,className:"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400"},note_added:{icon:ve,className:"bg-[#f5ede8] text-[#A8836F]"},conflict_flagged:{icon:Te,className:"bg-amber-100 text-amber-600 dark:bg-amber-900/30 dark:text-amber-400"},task_completed:{icon:He,className:"bg-emerald-100 text-emerald-600 dark:bg-emerald-900/30 dark:text-emerald-400"},booking_changed:{icon:Be,className:"bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400"}};function Lt({weddingId:d}){const[i,j]=v.useState([]),[u,p]=v.useState(null),[y,s]=v.useState(!1),[l,c]=v.useState(!1),{isLoading:k}=q({queryKey:["/api/wedding-team",d,"activity-feed"],queryFn:async()=>{const m=await b("GET",`/api/wedding-team/${d}/activity-feed?limit=50`);if(!m.ok)return{data:[],nextCursor:null,hasMore:!1};const h=await m.json();return j(h.data),p(h.nextCursor),s(h.hasMore),h}}),x=async()=>{if(!(!u||l)){c(!0);try{const m=await b("GET",`/api/wedding-team/${d}/activity-feed?limit=50&cursor=${encodeURIComponent(u)}`);if(!m.ok)return;const h=await m.json();j(r=>[...r,...h.data]),p(h.nextCursor),s(h.hasMore)}finally{c(!1)}}},N=i;if(k)return e.jsx(xe,{rows:4,className:"py-4"});if(N.length===0)return e.jsx(M,{className:"border-dashed",children:e.jsx(W,{className:"p-0",children:e.jsx(le,{icon:Se,title:"No team activity yet",description:"Actions like file uploads, comments, and notes will appear here"})})});const S=(m=>{const h={};for(const r of m){const n=ge(r.createdAt,{month:"long",day:"numeric",year:"numeric"});h[n]||(h[n]=[]),h[n].push(r)}return h})(N);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent team activity across files, comments, notes, and more."}),Object.entries(S).map(([m,h])=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground mb-3 uppercase tracking-wider",children:m}),e.jsx("div",{className:"space-y-2",children:h.map(r=>{const n=Re[r.actionType]||Re.note_added,C=n.icon,D=[r.actorFirstName,r.actorLastName].filter(Boolean).join(" ")||"Unknown",a=D.split(" ").map(f=>f[0]).join("").substring(0,2).toUpperCase();return e.jsxs("div",{className:"flex items-start gap-3 py-2","data-testid":`activity-item-${r.id}`,children:[e.jsx("div",{className:`p-1.5 rounded-lg flex-shrink-0 ${n.className}`,children:e.jsx(C,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm",children:r.title}),r.details&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.details}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsxs(Oe,{className:"h-4 w-4",children:[e.jsx(Pe,{src:Ee(r.actorProfileImage,"thumbnail")||void 0}),e.jsx($e,{className:"text-[7px] bg-[#f5ede8] text-[#A8836F]",children:a})]}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[D," â¢"," ",new Date(r.createdAt).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})]})]})]})]},r.id)})})]},m)),y&&e.jsx("div",{className:"flex justify-center",children:e.jsx($,{variant:"outline",size:"sm",onClick:x,disabled:l,"data-testid":"button-activity-load-more",children:l?"Loading...":"Load More"})})]})}const Ut={initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3}};function Vt(d){return d.type==="vendor"&&d.vendorId!=null?{memberType:"vendor",memberId:String(d.vendorId)}:d.type==="custom"&&d.contactId!=null?{memberType:"custom",memberId:String(d.contactId)}:(d.type==="couple"||d.type==="planner")&&d.userId?{memberType:d.type,memberId:d.userId}:null}function _t({status:d}){const i={confirmed:{label:"Confirmed",className:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",icon:He},pending:{label:"Pending",className:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",icon:Be},declined:{label:"Declined",className:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",icon:Mt},tentative:{label:"Tentative",className:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",icon:Et}},j=i[d||"pending"]||i.pending,u=j.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${j.className}`,"data-testid":`badge-status-${d}`,children:[e.jsx(u,{className:"w-3 h-3"})," ",j.label]})}const Ke={name:"",category:"",role:"",pointOfContact:"",email:"",ph
1one:"",website:"",instagram:"",description:"",notes:"",isDayOfPoc:!1};function Rt({weddingId:d,onClose:i,weddingQueryParam:j}){const{toast:u}=je(),[p,y]=v.useState("vendor"),[s,l]=v.useState(Ke),{mutateAsync:c,isPending:k}=wt(),{effectiveRole:x}=Ge(),N=x==="planner"||x==="photographer"||x==="admin",w=P({mutationFn:n=>b("POST",`/api/wedding-team/${d}/day-of-poc`,n)}),S=P({mutationFn:n=>b("POST","/api/day-of-contacts"+j,{name:n.name,role:n.role||"Other",phone:n.phone||void 0,email:n.email||void 0,notes:n.notes||void 0})}),m=k||S.isPending||w.isPending,h=()=>{F.invalidateQueries({queryKey:["/api/wedding-team",d]}),F.invalidateQueries({queryKey:["/api/day-of-contacts"+j]})},r=async()=>{if(!s.name.trim()){u({title:"Name is required",variant:"destructive"});return}try{if(p==="vendor"){const n=s.category.trim();if(!n){u({title:"Category is required",variant:"destructive"});return}const C=await c({name:s.name,category:n,pointOfContact:s.pointOfContact||void 0,email:s.email||void 0,phone:s.phone||void 0,website:s.website||void 0,instagram:ot(s.instagram)||void 0,description:s.description||void 0});s.isDayOfPoc&&C?.id&&await w.mutateAsync({memberType:"vendor",memberId:String(C.id),isDayOfPoc:!0}),h(),u({title:"Vendor added to the team"})}else{const n=await S.mutateAsync({name:s.name,role:s.role||"Other",phone:s.phone,email:s.email,notes:s.notes});s.isDayOfPoc&&n?.id&&await w.mutateAsync({memberType:"custom",memberId:String(n.id),isDayOfPoc:!0}),h(),u({title:"Contact added"})}l(Ke),i()}catch(n){if(Ct(n))return;u({title:"Could not save",description:it(n)||"Try again.",variant:"destructive"})}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-1 inline-flex gap-1",children:[e.jsx("button",{type:"button",onClick:()=>y("vendor"),className:Q("px-3 py-1.5 rounded-md text-xs font-medium transition-colors",p==="vendor"?"bg-white text-[#2C1810] shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"toggle-mode-vendor",children:"Paid vendor"}),e.jsx("button",{type:"button",onClick:()=>y("contact"),className:Q("px-3 py-1.5 rounded-md text-xs font-medium transition-colors",p==="contact"?"bg-white text-[#2C1810] shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"toggle-mode-contact",children:"Personal contact"})]}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:p==="vendor"?"Saves to your Vendors list and shows up here in the Team Directory.":"Saves as a personal day-of contact (family, bridal party, officiant). Won't appear on the Vendors page."}),p==="vendor"&&N&&e.jsx(kt,{onSelect:n=>l(C=>({...C,name:n.name||"",category:n.category||"",pointOfContact:n.company||"",email:n.email||"",phone:n.phone||"",website:n.website||"",instagram:n.instagram||"",description:n.notes||""}))}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Name"}),e.jsx(V,{value:s.name,onChange:n=>l({...s,name:n.target.value}),placeholder:p==="vendor"?"Bloom & Co. Florals":"Aunt Linda","data-testid":"input-smart-name"})]}),p==="vendor"?e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Category"}),(()=>{const n=!!s.category&&!ct.includes(s.category);return e.jsxs(e.Fragment,{children:[e.jsxs(G,{value:n?"__custom__":s.category,onValueChange:C=>l({...s,category:C==="__custom__"?" ":C}),children:[e.jsx(B,{"data-testid":"select-smart-category",children:e.jsx(H,{placeholder:"Select category"})}),e.jsxs(Y,{children:[e.jsx(mt,{}),e.jsx(A,{value:"__custom__",children:"+ Add custom categoryâ¦"})]})]}),n&&e.jsx(V,{autoFocus:!0,value:s.category.trim()===""?"":s.category,onChange:C=>l({...s,category:C.target.value||" "}),placeholder:"Type your custom category","data-testid":"input-smart-category-custom"})]})})()]}):e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Role"}),e.jsxs(G,{value:s.role,onValueChange:n=>l({...s,role:n}),children:[e.jsx(B,{"data-testid":"select-smart-role",children:e.jsx(H,{placeholder:"Select role"})}),e.jsx(Y,{children:qt.map(n=>e.jsx(A,{value:n,children:n},n))})]})]}),p==="vendor"&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Point of contact"}),e.jsx(V,{value:s.pointOfContact,onChange:n=>l({...s,pointOfContact:n.target.value}),placeholder:"Person's name","data-testid":"input-smart-poc"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Email"}),e.jsx(V,{type:"email",value:s.email,onChange:n=>l({...s,email:n.target.value}),placeholder:"[email protected]","data-testid":"input-smart-email"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Phone"}),e.jsx(V,{value:s.phone,onChange:n=>l({...s,phone:n.target.value}),placeholder:"(555) 123-4567","data-testid":"input-smart-phone"})]}),p==="vendor"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Website"}),e.jsx(V,{value:s.website,onChange:n=>l({...s,website:n.target.value}),placeholder:"https://","data-testid":"input-smart-website"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:"Instagram"}),e.jsx(V,{value:s.instagram,onChange:n=>l({...s,instagram:n.target.value}),placeholder:"@handle","data-testid":"input-smart-instagram"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(O,{className:"text-xs",children:p==="vendor"?"Description":"Notes"}),e.jsx(Ie,{value:p==="vendor"?s.description:s.notes,onChange:n=>l(p==="vendor"?{...s,description:n.target.value}:{...s,notes:n.target.value}),rows:2,placeholder:p==="vendor"?"Anything to remember about this vendor":"Anything the team should know","data-testid":"input-smart-notes"})]}),e.jsxs("button",{type:"button",onClick:()=>l({...s,isDayOfPoc:!s.isDayOfPoc}),className:Q("w-full flex items-center gap-2 px-3 py-2 rounded-md border transition-colors text-left",s.isDayOfPoc?"border-[#A8836F] bg-[#faf6f3]":"border-border hover:bg-muted/50"),"data-testid":"toggle-smart-poc",children:[e.jsx(he,{className:Q("w-4 h-4",s.isDayOfPoc?"text-[#A8836F] fill-[#A8836F]":"text-muted-foreground")}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-xs font-medium",children:"Mark as Day-Of Point of Contact"}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Surfaces in the Wedding Day card and SMS reminders"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx($,{variant:"outline",onClick:i,disabled:m,"data-testid":"button-smart-cancel",children:"Cancel"}),e.jsxs(R,{size:"compact",onClick:r,disabled:m,"data-testid":"button-smart-save",children:[m&&e.jsx(ye,{className:"w-4 h-4 mr-2 animate-spin"}),p==="vendor"?"Add Vendor":"Add Contact"]})]})]})}
1function Kt({team:d,weddingId:i,canManage:j,canSharePlanner:u,weddingQueryParam:p}){const{toast:y}=je(),[s,l]=v.useState(!1),[c,k]=v.useState(null),[x,N]=v.useState(""),[w,S]=v.useState(null),[m,h]=v.useState(!1),[r,n]=v.useState(null),C=P({mutationFn:t=>b("POST","/api/wedding-team/introduce",t),onSuccess:()=>{y({title:"Introduction sent to the team"}),l(!1),N("")},onError:_("Couldn't send the introduction")}),D=P({mutationFn:({vendorId:t,status:g})=>b("PATCH",`/api/vendors/${t}/booking-status`,{status:g}),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team",i]}),S(null),y({title:"Booking status updated"})},onError:_("Couldn't update the booking status",()=>S(null))}),a=P({mutationFn:t=>b("POST",`/api/wedding-team/${i}/day-of-poc`,t),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team",i]})},onError:()=>{y({title:"Could not update Day-Of POC",variant:"destructive"})}});P({mutationFn:t=>b("POST","/api/day-of-contacts"+p,{name:t.name,role:t.role||"Other",phone:t.phone||void 0,email:t.email||void 0,notes:t.notes||void 0}),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team",i]}),F.invalidateQueries({queryKey:["/api/day-of-contacts"+p]}),h(!1),y({title:"Contact added"})},onError:_("Couldn't save the contact")});const f=P({mutationFn:t=>b("PUT",`/api/day-of-contacts/${t.id}`+p,{name:t.name,role:t.role||"Other",phone:t.phone||null,email:t.email||null,notes:t.notes||null}),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team",i]}),F.invalidateQueries({queryKey:["/api/day-of-contacts"+p]}),n(null),y({title:"Contact updated"})},onError:_("Couldn't save the contact")}),U=P({mutationFn:t=>b("DELETE",`/api/day-of-contacts/${t}`+p),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team",i]}),F.invalidateQueries({queryKey:["/api/day-of-contacts"+p]}),y({title:"Contact removed"})},onError:_("Couldn't remove the contact")});if(!d)return null;const K=d.members.filter(t=>t.isDayOfPoc),be=d.members.filter(t=>!t.isDayOfPoc),z={};for(const t of be){const g=t.category||"Other";z[g]||(z[g]=[]),z[g].push(t)}const J=["Couple","Planner","Photographer",...Object.keys(z).filter(t=>!["Couple","Planner","Photographer"].includes(t)).sort()],ce=()=>{const t=[];if(t.push(`${d.coupleNames||"Wedding"} â Day-Of Contacts`),K.length){t.push("","Reach these people first:");for(const g of K)t.push(`⢠${g.name} (${g.category})${g.phone?` â ${g.phone}`:""}${g.email?` â ${g.email}`:""}`)}t.push("","Full team:");for(const g of d.members)t.push(`⢠${g.name} (${g.category})${g.phone?` â ${g.phone}`:""}${g.email?` â ${g.email}`:""}`);return t.join(` 2`)},Ne=async()=>{const t=ce(),g=`${d.coupleNames||"Wedding"} â Day-Of Contacts`,E=navigator;if(typeof E.share=="function")try{await E.share({title:g,text:t});return}catch(se){if(se?.name==="AbortError")return}try{await navigator.clipboard.writeText(t),y({title:"Contact sheet copied to clipboard",description:"Paste into a message or email to share."})}catch{y({title:"Could not share",description:"Select and copy manually from the printable view.",variant:"destructive"})}},ee=(t,g)=>{const E=Vt(t),se=`${t.type}-${t.vendorId||t.contactId||t.userId}-${g}`,Z=t.vendorId||t.contactId||t.userId||g;return e.jsx(M,{className:`border shadow-sm ${t.isDayOfPoc?"ring-1 ring-[#A8836F]/40":""}`,"data-testid":`card-team-member-${Z}`,children:e.jsxs(W,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs(Oe,{className:"h-10 w-10 flex-shrink-0",children:[e.jsx(Pe,{src:Ee(t.profileImageUrl,"thumbnail")||void 0}),e.jsx($e,{className:"bg-[#f5ede8] text-[#A8836F] text-sm",children:t.name?.split(" ").map(X=>X[0]).join("").substring(0,2).toUpperCase()||e.jsx(Ye,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:t.name}),t.isDayOfPoc&&e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[9px] tracking-[0.12em] uppercase font-medium px-1.5 py-0.5 rounded bg-[#A8836F]/10 text-[#A8836F] border border-[#A8836F]/20","data-testid":`chip-poc-${Z}`,children:[e.jsx(he,{className:"w-2.5 h-2.5 fill-[#A8836F]"})," POC"]}),t.type==="vendor"&&e.jsx(_t,{status:t.bookingStatus})]}),t.pointOfContact&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Contact: ",t.pointOfContact]}),e.jsx("p",{className:"text-[10px] tracking-[0.15em] uppercase text-muted-foreground
2/70 mt-0.5",children:t.category}),e.jsxs("div",{className:"flex items-center gap-3 mt-1.5 flex-wrap",children:[t.email&&e.jsxs("a",{href:`mailto:${t.email}`,className:"text-xs text-muted-foreground hover:text-foreground flex items-center gap-1","data-testid":`link-email-${Z}`,children:[e.jsx(rt,{className:"w-3 h-3"})," ",t.email]}),t.phone&&e.jsxs("a",{href:`tel:${t.phone}`,className:"text-xs text-muted-foreground hover:text-foreground flex items-center gap-1",children:[e.jsx(Pt,{className:"w-3 h-3"})," ",t.phone]})]}),t.notes&&e.jsx("p",{className:"text-xs text-muted-foreground/80 mt-1.5",children:t.notes})]}),j&&E&&e.jsx("button",{onClick:()=>a.mutate({memberType:E.memberType,memberId:E.memberId,isDayOfPoc:!t.isDayOfPoc}),title:t.isDayOfPoc?"Remove Day-Of Point of Contact":"Mark as Day-Of Point of Contact",className:"p-1.5 rounded-md hover:bg-muted transition-colors flex-shrink-0 print:hidden","data-testid":`button-toggle-poc-${Z}`,"aria-label":"Toggle Day-Of POC",children:e.jsx(he,{className:`w-4 h-4 ${t.isDayOfPoc?"text-[#A8836F] fill-[#A8836F]":"text-muted-foreground"}`})})]}),j&&t.type==="vendor"&&e.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t print:hidden",children:[e.jsxs($,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>{k(t),l(!0)},"data-testid":`button-introduce-${t.vendorId}`,children:[e.jsx(Fe,{className:"w-3 h-3 mr-1"})," Introduce"]}),w===t.vendorId?e.jsxs(G,{onValueChange:X=>{D.mutate({vendorId:t.vendorId,status:X})},children:[e.jsx(B,{className:"h-7 text-xs w-[120px]",children:e.jsx(H,{placeholder:"Set status"})}),e.jsxs(Y,{children:[e.jsx(A,{value:"confirmed",children:"Confirmed"}),e.jsx(A,{value:"pending",children:"Pending"}),e.jsx(A,{value:"tentative",children:"Tentative"}),e.jsx(A,{value:"declined",children:"Declined"})]})]}):e.jsx($,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>
2S(t.vendorId),"data-testid":`button-status-${t.vendorId}`,children:"Status"})]}),j&&t.type==="custom"&&t.contactId!=null&&e.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t print:hidden",children:[e.jsxs($,{variant:"outline",size:"sm",className:"text-xs h-7",onClick:()=>n(t),"data-testid":`button-edit-contact-${t.contactId}`,children:[e.jsx($t,{className:"w-3 h-3 mr-1"})," Edit"]}),e.jsx($,{variant:"outline",size:"sm",className:"text-xs h-7 text-red-500 hover:text-red-600",onClick:()=>{confirm("Remove this contact?")&&U.mutate(t.contactId)},"data-testid":`button-delete-contact-${t.contactId}`,"aria-label":"Delete contact",children:e.jsx(Me,{className:"w-3 h-3"})})]})]})},se)},me=d.members.find(t=>t.type==="planner"),te=d.weddingDate?(()=>{try{return new Date(d.weddingDate+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}catch{return d.weddingDate}})():null;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"hidden print:block wedding-team-print-header",children:[e.jsx("h1",{children:d.coupleNames||"Wedding Contact Sheet"}),te&&e.jsx("p",{className:"wedding-print-date",children:te}),me&&e.jsxs("p",{className:"wedding-print-planner",children:["Coordinated by ",me.name]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap print:hidden",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Star team members as ",e.jsx("span",{className:"font-medium text-foreground",children:"Day-Of Points of Contact"})," so they surface in the Wedding Day card, printed contact sheet, and SMS timeline reminders."]}),e.jsxs("div",{className:"flex items-center gap-2",children:[j&&e.jsxs(R,{size:"compact",onClick:()=>{h(!0)},"data-testid":"button-add-contact",children:[e.jsx(Tt,{className:"w-3.5 h-3.5 mr-1"})," Add Contact"]}),u&&i>0&&e.jsx(pt,{weddingId:i,coupleNames:d?.coupleNames,label:"Add Co-Planner",className:"h-8",testId:"button-add-coplanner-team"}),e.jsxs(ft,{children:[e.jsx(gt,{asChild:!0,children:e.jsx($,{size:"sm",variant:"outline",className:"h-8 px-2","data-testid":"button-directory-menu","aria-label":"More options",children:e.jsx(Ft,{className:"w-4 h-4"})})}),e.jsxs(vt,{align:"end",children:[e.jsxs(Ce,{onClick:Ne,"data-testid":"menu-share-contacts",children:[e.jsx(At,{className:"w-4 h-4 mr-2"})," Share contact sheet"]}),e.jsxs(Ce,{onClick:()=>window.print(),"data-testid":"menu-print-contacts",children:[e.jsx(Dt,{className:"w-4 h-4 mr-2"})," Print"]}),e.jsx(Ce,{asChild:!0,"data-testid":"menu-export-pdf",children:e.jsx(et,{href:"/print",children:e.jsxs("span",{className:"flex items-center",children:[e.jsx(We,{className:"w-4 h-4 mr-2"})," Export PDF"]})})})]})]})]})]}),K.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(he,{className:"w-4 h-4 text-[#A8836F] fill-[#A8836F]"}),e.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-[#A8836F]",children:"Day-Of Points of Contact"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Reach these people first"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 print:grid-cols-2",children:K.map((t,g)=>ee(t,g))})]}),J.filter(t=>z[t]?.length).map(t=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-muted-foreground mb-2 uppercase tracking-wider",children:t}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 print:grid-cols-2",children:z[t].map((g,E)=>ee(g,E))})]},t)),e.jsxs("div",{className:"hidden print:block wedding-team-print-footer",children:["Generated by Colara ·"," ",new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]}),e.jsx(re,{open:s,onOpenChange:l,children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsxs(de,{children:["Introduce ",c?.name," to the Team"]})}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This will send a message to the vendor channel introducing ",c?.name," (",c?.category,") to everyone on the team."]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(ut,{field:"message",weddingId:i,currentText:x,onTextGenerated:N,context:{threadType:"vendor",prompt:`Introduce ${c?.name||"a new vend
2or"} (${c?.category||"vendor"}) to the wedding team so everyone knows who to coordinate with.`},mode:"both",size:"xs"})}),e.jsx(Ie,{placeholder:`e.g., "Hey team, ${c?.name} is handling ${c?.category?.toLowerCase()} for the wedding â reach out if you need to coordinate!"`,value:x,onChange:t=>N(t.target.value),"data-testid":"input-intro-message"}),e.jsxs(R,{size:"lg",disabled:C.isPending,onClick:()=>C.mutate({weddingId:i,vendorName:c?.name,vendorCategory:c?.category,vendorEmail:c?.email,message:x||void 0}),"data-testid":"button-send-intro",children:[C.isPending?e.jsx(ye,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(Fe,{className:"w-4 h-4 mr-2"}),"Send Introduction"]})]})}),e.jsx(re,{open:m,onOpenChange:h,children:e.jsxs(oe,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx(ie,{children:e.jsx(de,{className:"font-display font-light",children:"Add to Team"})}),e.jsx(Rt,{weddingId:i,weddingQueryParam:p,onClose:()=>h(!1)})]})}),e.jsx(re,{open:!!r,onOpenChange:t=>{t||n(null)},children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsx(de,{className:"font-display font-light",children:"Edit Contact"})}),r&&e.jsx(Nt,{defaultValues:{name:r.name||"",role:r.role||"",phone:r.phone||"",email:r.email||"",notes:r.notes||"",instagram:r.instagram||""},onSubmit:t=>{r.contactId!=null&&f.mutate({...t,id:r.contactId})},isPending:f.isPending,submitLabel:"Save Changes"})]})})]})}function zt({weddingId:d,weddingQueryParam:i,canManage:j}){const{toast:u}=je(),{user:p}=De(),[y,s]=v.useState(!1),[l,c]=v.useState(null),[k,x]=v.useState(""),[N,w]=v.useState(""),[S,m]=v.useState("general"),[h,r]=v.useState("none"),[n,C]=v.useState(!1),[D,a]=v.useState("none"),[f,U]=v.useState("all"),[K,be]=v.useState(null),{data:z}=q({queryKey:["/api/wedding-team",d],queryFn:async()=>{const o=await b("GET",`/api/wedding-team/${d}`);return o.ok?o.json():{weddingId:d,coupleNames:"",weddingDate:"",members:[]}},enabled:!!d}),J=z?.members.filter(o=>o.type==="vendor")||[],{data:ce=[],isLoading:Ne}=q({queryKey:["/api/wedding-shared-files",i],queryFn:async()=>(await b("GET",`/api/wedding-shared-files${i}`)).json()}),{data:ee,isLoading:me}=q({queryKey:["/api/wedding-shared-files/by-vendor",i],queryFn:async()=>{const o=await b("GET",`/api/wedding-shared-files/by-vendor${i}`);if(!o.ok)throw new Error("Failed");return o.json()},enabled:D==="vendor"}),te=P({mutationFn:o=>b("DELETE",`/api/wedding-shared-files/${o}`),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-shared-files",i]}),F.invalidateQueries({queryKey:["/api/wedding-shared-files/by-vendor",i]}),u({title:"File removed"})},onError:_("Couldn't remove the file")}),[t,g]=v.useState(null),E=o=>{const I=o.target.files?.[0];I&&(c(I),x(T=>T||I.name.replace(/\.[^.]+$/,"")))},se=async()=>{if(l){C(!0);try{const o=await b("POST","/api/uploads/request-url",{name:l.name,size:l.size,contentType:l.type||"application/octet-stream"}),{uploadURL:I,objectPath:T}=await o.json();if(!(await fetch(I,{method:"PUT",body:l,headers:{"Content-Type":l.type||"application/octet-stream"}})).ok)throw new Error("Upload failed");const Je=k.trim()||l.name;await b("POST","/api/wedding-shared-files",{fileName:Je,fileUrl:T,fileType:l.type,fileSize:l.size,category:S,description:N,vendorId:h&&h!=="none"?Number(h):void 0}),F.invalidateQueries({queryKey:["/api/wedding-shared-files",i]}),F.invalidateQueries({queryKey:["/api/wedding-shared-files/by-vendor",i]}),u({title:"File shared with the team"}),s(!1),c(null),x(""),w(""),m("general"),r("none")}catch{u({title:"Failed to upload file",variant:"destructive"})}finally{C(!1)}}},Z={general:"General",floral:"Floral / Decor",music:"Music / Playlist",timeline:"Timeline",photos:"Photos / Inspiration",contracts:"Contracts",other:"Other"},X=f==="all"?ce:ce.filter(o=>String(o.vendorId??"none")===f),we=o=>e.jsx(M,{className:"border shadow-sm","data-testid":`card-shared-file-${o.id}`,children:e.jsx(W,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[e.jsx("div",{className:"p-2 bg-[#f5ede8] rounded-lg flex-shrink-0",children:e.jsx(ve,{className:"w-5 h-5 text-[#A8836F]"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:o.fileName}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[[o.uploaderFirstName,o.uploaderLastName].filter(
2Boolean).join(" ")," â¢"," ",ge(o.createdAt)]}),o.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:o.description}),e.jsxs("div",{className:"flex items-center gap-1 mt-1 flex-wrap",children:[o.category&&o.category!=="general"&&e.jsx(Ve,{variant:"outline",className:"text-[10px]",children:Z[o.category]||o.category}),o.vendorId&&D==="none"&&e.jsx(Ve,{className:"bg-[#f5ede8] text-[#A8836F] text-[10px] hover:bg-[#f5ede8]",children:J.find(I=>I.vendorId===o.vendorId)?.name||"Vendor"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx("a",{href:o.fileUrl,target:"_blank",rel:"noopener noreferrer",children:e.jsx($,{variant:"outline",size:"sm",className:"h-7 w-7 p-0","data-testid":`button-download-${o.id}`,"aria-label":"Download file",children:e.jsx(We,{className:"w-3.5 h-3.5"})})}),(o.uploadedBy===p?.id||j)&&e.jsx($,{variant:"outline",size:"sm",className:"h-7 w-7 p-0 text-red-500 hover:text-red-600",onClick:()=>g(o.id),"data-testid":`button-delete-file-${o.id}`,"aria-label":"Delete file",children:e.jsx(Me,{className:"w-3.5 h-3.5"})})]})]})})},o.id);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3",children:[e.jsx(fe,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Shared Files"})," are anything you (the couple or planner) want to share with the team â inspiration photos, playlists, signage, floor plans. You can tag a file to a vendor so it shows up in their folder, or leave it general for everyone."]})]}),e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("div",{className:"inline-flex rounded-md border border-border/40 overflow-hidden",children:[e.jsx(R,{size:"plain",type:"button",className:Q("px-3 py-1.5 text-xs transition-colors",D==="none"?" ":"bg-transparent text-muted-foreground hover:bg-muted/40"),onClick:()=>a("none"),"data-testid":"button-view-list",children:"All Files"}),e.jsxs(R,{size:"plain",type:"button",className:Q("px-3 py-1.5 text-xs transition-colors border-l border-border/40",D==="vendor"?" ":"bg-transparent text-muted-foreground hover:bg-muted/40"),onClick:()=>a("vendor"),"data-testid":"button-view-grouped",children:[e.jsx(ue,{className:"w-3 h-3 inline mr-1"})," Group by Vendor"]})]}),D==="none"&&J.length>0&&e.jsxs(G,{value:f,onValueChange:U,children:[e.jsx(B,{className:"h-8 text-xs w-[180px]","data-testid":"select-vendor-filter",children:e.jsx(H,{placeholder:"Filter by vendor"})}),e.jsxs(Y,{children:[e.jsx(A,{value:"all",children:"All vendors"}),e.jsx(A,{value:"none",children:"General (no vendor)"}),J.map(o=>e.jsx(A,{value:String(o.vendorId),children:o.name},o.vendorId))]})]})]}),e.jsxs(R,{size:"compact",onClick:()=>s(!0),"data-testid":"button-upload-file",children:[e.jsx(It,{className:"w-4 h-4 mr-2"})," Share File"]})]}),D==="vendor"?me?e.jsx(xe,{rows:3,className:"py-4"}):(()=>{const o=ee?.vendorFolders?.filter(T=>T.files.length>0)||[],I=ee?.generalFiles||[];return o.length===0&&I.length===0?e.jsx(M,{className:"border-dashed",children:e.jsx(le,{icon:ue,title:"No files yet",description:"Tag a vendor when you share a file to organize it here.",variant:"soft",testId:"empty-state-team-files"})}):e.jsxs("div",{className:"space-y-3",children:[o.map(T=>e.jsx(M,{className:"border shadow-sm","data-testid":`vendor-folder-${T.vendor.id}`,children:e.jsxs(W,{className:"p-0",children:[e.jsxs("button",{className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-muted/20 transition-colors",onClick:()=>be(K===T.vendor.id?null:T.vendor.id),"data-testid":`button-expand-vendor-${T.vendor.id}`,children:[e.jsx("div",{className:"p-1.5 bg-[#f5ede8] rounded-lg shrink-0",children:e.jsx(ue,{className:"w-4 h-4 text-[#A8836F]"})}),e.jsxs("div",{className:"flex-1 text-left min-w-0",children:[e.jsx("p",{className:"text-sm font-medium",children:T.vendor.name}),e.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[T.vendor.category," ⢠",T.files.length," file",T.files.length!==1?"s":""]})]}),K===T.vendor.id?e.jsx(tt,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(Ae,{className:"w-4 h-4 text-muted-foreground"})]}),K===T.vendor.id&&e.jsx("div",{className:"border-t px-2 py-2 space-y-2",children:T.files.map(we)})]})},T.vendor.id)),I.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wider",children:"General (no vendor)"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:I.map(we)})]})]})})():Ne?e.jsx(xe,{rows:3,className:"py-4"}):X.length===0?e.jsx(M,{className:"border-dashed",children:e.jsx(W,{className:"p-0",children:e.jsx(le,{icon:fe,title:f!=="all"?"No files for this filter":"No shared files yet",description:"Upload files so everyone on the team can access them"})})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:X.map(we)}),e.jsx(re,{open:y,onOpenChange:o=>{s(o),o||(c(null),x(""),w(""),m("general"),r("none"))},children:e.jsxs(oe,{children:[e.jsx(ie,{children:e.jsx(de,{children:"Share a File"})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"relative",children:e.jsx("input",{type:"file",onChange:E,disabled:n,className:"block w-full text-sm text-muted-foreground file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-[#f5ede8] file:text-[#A8836F] hover:file:bg-[#ede1d9] cursor-pointer","data-testid":"input-file-upload"})}),l&&e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Selected: ",l.name]}),e.jsxs("div",{children:[e.jsx(O,{className:"text-xs",children:"Title"}),e.jsx(V,{placeholder:"e.g. Reception Floor Plan v2",value:k,onChange:o=>x(o.target.value),"data-testid":"input-file-title"}
2),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"What the team will see. Defaults to the file name."})]}),e.jsxs("div",{children:[e.jsx(O,{className:"text-xs",children:"Category"}),e.jsxs(G,{value:S,onValueChange:m,children:[e.jsx(B,{"data-testid":"select-file-category",children:e.jsx(H,{placeholder:"Category"})}),e.jsx(Y,{children:Object.entries(Z).map(([o,I])=>e.jsx(A,{value:o,children:I},o))})]})]}),J.length>0&&e.jsxs("div",{children:[e.jsx(O,{className:"text-xs",children:"Tag to vendor (optional)"}),e.jsxs(G,{value:h,onValueChange:r,children:[e.jsx(B,{"data-testid":"select-vendor-folder",children:e.jsx(H,{placeholder:"Vendor folder (optional)"})}),e.jsxs(Y,{children:[e.jsx(A,{value:"none",children:"General (no vendor)"}),J.map(o=>e.jsxs(A,{value:String(o.vendorId),children:[o.name," â ",o.category]},o.vendorId))]})]})]}),e.jsxs("div",{children:[e.jsx(O,{className:"text-xs",children:"Description (optional)"}),e.jsx(V,{placeholder:"Short note about this file",value:N,onChange:o=>w(o.target.value),"data-testid":"input-file-description"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx($,{variant:"outline",onClick:()=>s(!1),"data-testid":"button-cancel-share",children:"Cancel"}),e.jsx(R,{size:"compact",onClick:se,disabled:!l||n,"data-testid":"button-confirm-share",children:n?e.jsx(ye,{className:"w-4 h-4 animate-spin"}):"Share"})]})]})]})}),e.jsx(st,{open:t!==null,onOpenChange:o=>!o&&g(null),title:"Delete this file?",onConfirm:()=>{t!==null&&(te.mutate(t),g(null))},isPending:te.isPending,testId:"button-confirm-delete-file"})]})}function Wt({weddingId:d,weddingQueryParam:i,canManage:j}){const{toast:u}=je(),{user:p}=De(),[y,s]=v.useState(""),[l,c]=v.useState("note"),{data:k=[],isLoading:x}=q({queryKey:["/api/wedding-team-notes",i],queryFn:async()=>(await b("GET",`/api/wedding-team-notes${i}`)).json()}),{data:N=[]}=q({queryKey:["/api/timeline"+i],queryFn:async()=>(await b("GET",`/api/timeline${i}`)).json()}),[w,S]=v.useState(""),m=P({mutationFn:r=>b("POST","/api/wedding-team-notes",r),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team-notes",i]}),s(""),c("note"),S(""),u({title:l==="conflict"?"Timing conflict flagged":"Coordination note added"})},onError:r=>_(l==="conflict"?"Couldn't flag the conflict":"Couldn't save the note")(r)}),h=P({mutationFn:r=>b("DELETE",`/api/wedding-team-notes/${r}`),onSuccess:()=>{F.invalidateQueries({queryKey:["/api/wedding-team-notes",i]}),u({title:"Note removed"})},onError:_("Couldn't remove the note")});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(M,{className:"border shadow-sm",children:e.jsxs(W,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(G,{value:l,onValueChange:c,children:[e.jsx(B,{className:"w-[160px]","data-testid":"select-note-type",children:e.jsx(H,{})}),e.jsxs(Y,{children:[e.jsx(A,{value:"note",children:"ð Coordination Note"}),e.jsx(A,{value:"conflict",children:"â ï¸ Timing Conflict"}),e.jsx(A,{value:"request",children:"ð Setup Request"})]})]}),N.length>0&&e.jsxs(G,{value:w,onValueChange:S,children:[e.jsx(B,{className:"flex-1","data-testid":"select-timeline-event",children:e.jsx(H,{placeholder:"Link to timeline event (optional)"})}),e.jsxs(Y,{children:[e.jsx(A,{value:"none",children:"No specific event"}),N.map(r=>e.jsx(A,{value:String(r.id),children:r.title},r.id))]})]})]}),e.jsx(Ie,{placeholder:l==="conflict"?'e.g., "Need 30 min before ceremony for floral setup â current timeline only has 15 min"':'e.g., "DJ will need power access by 2pm for sound check"',value:y,onChange:r=>s(r.target.value),"data-testid":"input-team-note"}),e.jsxs(R,{size:"compact",disabled:!y.trim()||m.isPending,onClick:()=>m.mutate({content:y,noteType:l,timelineEventId:w&&w!=="none"?Number(w):void 0}),"data-testid":"button-add-note",children:[m.isPending?e.jsx(ye,{className:"w-4 h-4 animate-spin mr-2"}):l==="conflict"?e.jsx(Te,{className:"w-4 h-4 mr-2"}):e.jsx(L,{className:"w-4 h-4 mr-2"}),l==="conflict"?"Flag Conflict":"Add Note"]})]})}),x?e.jsx(xe,{rows:3,className:"py-4"}):k.length===0?e.jsx(M,{className:"border-dashed",children:e.jsx(W,{className:"p-0",children:e.jsx(le,{icon:L,title:"No coordination notes yet",description:"Add notes for the team about setup needs, timing conflicts, or coordination details"})})}):e.jsx("div",{className:"space-y-2",children:k.map(r=>e.jsx(M,{className:`border shadow-sm ${r.noteType==="conflict"?"border-amber-300 dark:border-amber-700":""}`,"data-testid":`card-team-note-${r.id}`,children:e.jsx(W,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`p-1.5 rounded-lg flex-shrink-0 ${r.noteType==="conflict"?"bg-amber-100 dar
2k:bg-amber-900/30":r.noteType==="request"?"bg-blue-100 dark:bg-blue-900/30":"bg-[#f5ede8]"}`,children:r.noteType==="conflict"?e.jsx(Te,{className:"w-4 h-4 text-amber-600"}):r.noteType==="request"?e.jsx(ve,{className:"w-4 h-4 text-blue-600"}):e.jsx(L,{className:"w-4 h-4 text-[#A8836F]"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm",children:r.content}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[[r.authorFirstName,r.authorLastName].filter(Boolean).join(" ")," â¢"," ",ge(r.createdAt)]})]})]}),(r.authorId===p?.id||j)&&e.jsx($,{variant:"outline",size:"sm",className:"h-7 w-7 p-0 text-red-500 hover:text-red-600 flex-shrink-0",onClick:()=>h.mutate(r.id),"data-testid":`button-delete-note-${r.id}`,"aria-label":"Delete note",disabled:h.isPending&&h.variables===r.id,children:e.jsx(Me,{className:"w-3.5 h-3.5"})})]})})},r.id))})]})}const Gt={"couple-planner-private":{label:"Couple & Planner",description:"Private thread between couple and planner",roles:["couple","bride","groom","admin","planner","photographer"]},"couple-planner":{label:"Wedding Team Chat",description:"Shared with couple, planner, and vendors",roles:["couple","bride","groom","admin","planner","photographer","vendor"]}};function Bt(d){const i=Date.now()-new Date(d).getTime(),j=Math.floor(i/6e4);if(j<1)return"Just now";if(j<60)return`${j}m`;const u=Math.floor(j/60);if(u<24)return`${u}h`;const p=Math.floor(u/24);return p<7?`${p}d`:ge(d)}function Ht({weddingId:d,weddingQueryParam:i,team:j,role:u}){const[,p]=at(),[y,s]=v.useState(!1),{user:l}=De(),[c,k]=v.useState(null),[x,N]=v.useState(null),w=P({mutationFn:async a=>{await b("POST",`/api/messages/${a}/mark-read`+i)},onSuccess:()=>{F.invalidateQueries({queryKey:["/api/messages/unread-counts"]}),F.invalidateQueries({queryKey:["/api/messages/unread-counts",i]})},onError:_("Couldn't mark messages as read")}),{data:S=[]}=q({queryKey:["/api/messages/vendor-threads",i],queryFn:async()=>{const a=await b("GET","/api/messages/vendor-threads"+i);return a.ok?a.json():dt(a,[])}}),{data:m}=q({queryKey:["/api/messages/unread-counts",i],queryFn:async()=>{const a=await b("GET","/api/messages/unread-counts"+i);return a.ok?a.json():{counts:{},totalUnread:0}},refetchInterval:3e4}),h=ze(u),r=Object.entries(Gt).filter(([,a])=>a.roles.includes(u)),n=[];for(const[a,f]of r){const U=m?.counts?.[a];n.push({key:a,name:f.label,subtitle:f.description,kind:"group",threadType:a,unread:U?.unread||0,lastMessage:U?.lastMessage,lastMessageAt:U?.lastMessageAt,icon:f.label==="Couple & Planner"?nt:L})}for(const a of S){const f=m?.counts?.[a.threadType];n.push({key:a.threadType,name:a.vendorName,subtitle:a.vendorCategory,kind:"vendor",threadType:a.threadType,vendor:a,unread:f?.unread||0,lastMessage:f?.lastMessage,lastMessageAt:f?.lastMessageAt,icon:Ye})}function C(a){a.kind==="group"?(k(a.threadType),N(null),w.mutate(a.threadType)):a.vendor&&(N(a.vendor),k(null),w.mutate(a.vendor.threadType))}n.sort((a,f)=>a.lastMessageAt&&f.lastMessageAt?new Date(f.lastMessageAt).getTime()-new Date(a.lastMessageAt).getTime():a.lastMessageAt?-1:f.lastMessageAt?1:a.name.localeCompare(f.name));const D=(j?.members||[]).filter(a=>a.type==="vendor"&&a.vendorId);if(c||x){const a=x?x.vendorName:c?ke[c].label:"",f=x?`Direct message with ${x.vendorName}${x.vendorCategory?` (${x.vendorCategory})`:""}`:c?ke[c].description:"";return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs($,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground -ml-2",onClick:()=>{k(null),N(null)},"data-testid":"button-back-to-conversations",children:[e.jsx(Ae,{className:"w-4 h-4 mr-1 rotate-180"}),"All conversations"]}),e.jsxs("div",{className:"text-right min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:a}),e.jsx("p",{className:"text-[11px] text-muted-foreground/70 truncate",children:f})]})]}),e.jsx("div",{className:"border border-border/40 rounded-lg overflow-hidden bg-card flex flex-col",style:{height:"70vh"},children:x?e.jsx(_e,{threadType:x.threadType,currentUserId:l?.id||"",config:{label:x.vendorName,description:`Direct conversation with ${x.vendorName}${x.vendorCategory?` (${x.vendorCategory})`:""}`,icon:Ot,roles:[]}},x.threadType):c?e.jsx(_e,{threadType:c,currentUserId:l?.id||"",config:ke[c]},c):null})]})}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-medium text-foreground",children:"Team Conversations"}
2),e.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"Filtered to just this wedding's team. Same threads as your main inbox."})]}),h&&D.length>0&&e.jsxs(R,{size:"compact",onClick:()=>s(!0),"data-testid":"button-team-new-message",children:[e.jsx(Fe,{className:"w-3.5 h-3.5 mr-1.5"}),"New Message"]})]}),n.length===0?e.jsx(M,{children:e.jsx(le,{icon:L,title:"No conversations yet",description:"Start a thread with a vendor to keep all wedding team communication in one place.",primaryAction:h&&D.length>0?{label:"Start one",onClick:()=>s(!0),testId:"button-team-start-first-message"}:void 0,testId:"empty-state-team-conversations"})}):e.jsx("div",{className:"border border-border/40 rounded-lg overflow-hidden divide-y divide-border/40 bg-card",children:n.map(a=>{const f=a.icon;return e.jsxs("button",{onClick:()=>C(a),className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/40 transition-colors","data-testid":`row-team-message-${a.key}`,children:[e.jsx("div",{className:"w-9 h-9 rounded-full bg-[#f5ede8] flex items-center justify-center flex-shrink-0",children:e.jsx(f,{className:"w-4 h-4 text-[#A8836F]"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:`text-sm truncate ${a.unread>0?"font-semibold text-foreground":"font-medium text-foreground"}`,children:a.name}),a.lastMessageAt&&e.jsx("span",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:Bt(a.lastMessageAt)})]}),e.jsx("p",{className:`text-xs truncate mt-0.5 ${a.unread>0?"text-foreground/80":"text-muted-foreground"}`,children:a.lastMessage||a.subtitle})]}),a.unread>0&&e.jsx("span",{className:"min-w-[20px] h-5 flex items-center justify-center rounded-full bg-rose-500 text-white text-[10px] font-semibold px-1.5","data-testid":`badge-team-message-unread-${a.key}`,children:a.unread>99?"99+":a.unread}),e.jsx(Ae,{className:"w-4 h-4 text-muted-foreground/70"})]},a.key)})}),e.jsx(re,{open:y,onOpenChange:s,children:e.jsxs(oe,{className:"max-w-md",children:[e.jsx(ie,{children:e.jsx(de,{children:"New Message"})}),e.jsxs("div",{className:"space-y-2 max-h-[60vh] overflow-y-auto",children:[r.map(([a,f])=>e.jsxs("button",{onClick:()=>{s(!1),k(a),N(null),w.mutate(a)},className:"w-full flex items-center gap-3 p-3 rounded-md border border-border/40 hover:bg-muted/40 text-left","data-testid":`button-pick-thread-${a}`,children:[e.jsx(L,{className:"w-4 h-4 text-[#A8836F]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:f.label}),e.jsx("p",{className:"text-xs text-muted-foreground/70",children:f.description})]})]},a)),D.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wider text-muted-foreground/70 mt-3 px-1",children:"Vendors"}),D.map(a=>e.jsxs("button",{onClick:()=>{s(!1);const f=S.find(U=>U.vendorId===a.vendorId);f?(N(f),k(null),w.mutate(f.threadType)):p(`/messages?vendorDm=${a.vendorId}`)},className:"w-full flex items-center gap-3 p-3 rounded-md border border-border/40 hover:bg-muted/40 text-left","data-testid":`button-pick-vendor-${a.vendorId}`,children:[e.jsxs(Oe,{className:"w-7 h-7",children:[e.jsx(Pe,{src:Ee(a.profileImageUrl,"thumbnail")||void 0}),e.jsx($e,{className:"text-xs",children:a.name?.[0]||"?"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:a.name}),e.jsx("p",{className:"text-xs text-muted-foreground/70 truncate",children:a.category})]})]},a.vendorId))]})]})]})})]})}function Kn(){const{selectedWeddingId:d,weddingQueryParam:i}=Ze();lt();const{data:j}=Xe(),{effectiveRole:u}=Ge(),p=yt("wedding-team"),y=ze(u)||Le(u)||u==="photographer"||u==="admin",{weddingId:s,resolving:l}=Qe(d),{data:c,isLoading:k}=q({queryKey:["/api/wedding-team",s],queryFn:async()=>{const m=await b("GET",`/api/wedding-team/${s}`);if(!m.ok)throw new Error("Failed to load team");return m.json()},enabled:!!s}),{data:x}=q({queryKey:["/api/messages/unread-counts",i],queryFn:async()=>{const m=await b("GET","/api/messages/unread-counts"+i);return m.ok?m.json():{counts:{},totalUnread:0}},enabled:!!s,refetchInterval:3e4}),N=x?.totalUnread||0;if(p)return e.jsxs("div",{className:"w-full",children:[e.jsx(pe,{}),e.jsx(bt,{title:"Wedding Team",description:"Build a shared team hub for every wedding: invite collaborators, star day-of contacts, share files, and message everyone in one place.",testId:"free-plan-lock-wedding-team"})]});if(!s)return e.jsxs("div",{className:"w-full",children:[e.jsx(pe,{}),l?e.jsx(Ue,{variant:"cards"}):e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-muted-foreground",children:"Select a wedding to view the team"})})]});if(k)return e.jsxs("div",{className:"w-full",children:[e.jsx(pe,{}),e.jsx(Ue,{variant:"cards"})]});const w=c?.members.filter(m=>m.type==="vendor").length||0,S=c?.members.filter(m=>m.bookingStatus==="confirmed").length||0;return e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"print:hidden",children:e.jsx(pe,{})}
2),e.jsxs(St.div,{...Ut,className:"max-w-5xl mx-auto space-y-6 px-4 py-6",children:[e.jsx("div",{className:"print:hidden",children:e.jsx(jt,{title:"What is this?",description:"Your Wedding Team is the central hub for everyone involved in making your day happen â your planner, photographer, florist, DJ, and more. See every contact in one place, star Day-Of Points of Contact for wedding-day reminders, share files, and coordinate logistics.",guideSlug:"wedding-team",storageKey:"wedding-team",steps:["Review the Team Directory â couples, planners, booked vendors, and any custom contacts all live here.","Tap the star to mark someone as a Day-Of Point of Contact. They'll appear on the dashboard, the printed contact sheet, and get timeline SMS reminders.","Use 'Add Contact' to include anyone not in the system (officiant, venue coordinator, emergency contact).","Share or print the contact sheet so your whole team has it on wedding day."]})}),e.jsxs("div",{className:"print:hidden",children:[e.jsx("h1",{className:"text-2xl font-light tracking-tight",children:"Wedding Team"}),e.jsxs("p",{className:"text-muted-foreground text-sm mt-1",children:[w," vendor",w!==1?"s":""," ⢠",S," confirmed"]})]}),e.jsxs(ht,{defaultValue:"directory",className:"w-full",children:[e.jsxs(xt,{className:"w-full justify-start flex-wrap h-auto bg-transparent p-0 gap-8 border-b border-border/60 rounded-none print:hidden","data-testid":"tabs-wedding-team",children:[e.jsxs(ae,{value:"directory",className:"flex items-center gap-2 px-0 pb-3 pt-0 rounded-none bg-transparent text-sm font-light tracking-wide text-muted-foreground border-b-2 border-transparent data-[state=active]:bg-transparent data-[state=active]:text-[#A8836F] data-[state=active]:border-[#A8836F] data-[state=active]:shadow-none hover:text-foreground transition-colors","data-testid":"tab-directory",children:[e.jsx(qe,{className:"w-4 h-4"})," Team Directory"]}),e.jsxs(ae,{value:"files",className:"flex items-center gap-2 px-0 pb-3 pt-0 rounded-none bg-transparent text-sm font-light tracking-wide text-muted-foreground border-b-2 border-transparent data-[state=active]:bg-transparent data-[state=active]:text-[#A8836F] data-[state=active]:border-[#A8836F] data-[state=active]:shadow-none hover:text-foreground transition-colors","data-testid":"tab-files",children:[e.jsx(fe,{className:"w-4 h-4"})," Shared Files"]}),e.jsxs(ae,{value:"messages",className:"flex items-center gap-2 px-0 pb-3 pt-0 rounded-none bg-transparent text-sm font-light tracking-wide text-muted-foreground border-b-2 border-transparent data-[state=active]:bg-transparent data-[state=active]:text-[#A8836F] data-[state=active]:border-[#A8836F] data-[state=active]:shadow-none hover:text-foreground transition-colors relative","data-testid":"tab-messages",children:[e.jsx(L,{className:"w-4 h-4"})," Messages",N>0&&e.jsx("span",{className:"ml-1 min-w-[18px] h-[18px] flex items-center justify-center rounded-full bg-rose-500 text-white text-[10px] font-semibold px-1","data-testid":"badge-messages-tab-unread",children:N>99?"99+":N})]}),e.jsxs(ae,{value:"coordination",className:"flex items-center gap-2 px-0 pb-3 pt-0 rounded-none bg-transparent text-sm font-light tracking-wide text-muted-foreground border-b-2 border-transparent data-[state=active]:bg-transparent data-[state=active]:text-[#A8836F] data-[state=active]:border-[#A8836F] data-[state=active]:shadow-none hover:text-foreground transition-colors","data-testid":"tab-coordination",children:[e.jsx(L,{className:"w-4 h-4"})," Coordination"]}),e.jsxs(ae,{value:"activity",className:"flex items-center gap-2 px-0 pb-3 pt-0 rounded-none bg-transparent text-sm font-light tracking-wide text-muted-foreground border-b-2 border-transparent data-[state=active]:bg-transparent data-[state=active]:text-[#A8836F] data-[state=active]:border-[#A8836F] data-[state=active]:shadow-none hover:text-foreground transition-colors","data-testid":"tab-activity",children:[e.jsx(Se,{className:"w-4 h-4"})," Activity Feed"]})]}),e.jsxs(ne,{value:"directory",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3 print:hidden",children:[e.jsx(qe,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Directory"})," is the master contact list for everyone working on this wedding. Add paid vendors (florist, DJ, caterer) or personal contacts (mother of the bride, officiant, day-of helper). Mark anyone as the day-of point of contact so your team knows exactly who to call when something comes up."]})]}),e.jsx(Kt,{team:c,weddingId:s,canManage:y,canSharePlanner:Le(u)||u==="photographer"||u==="admin",weddingQueryParam:i})]}),e.jsxs(ne,{value:"files",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3",children:[e.jsx(ue,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Files"})," is your shared folder for anything you and your vendors might need to reference. Floor plans, shot lists you put together, signed contracts, vendor proposals, inspiration photos. Everyone on the team can see what's here."]})]}),e.jsx(zt,{weddingId:s,weddingQueryParam:i,canManage:y})]}),e.jsxs(ne,{value:"messages",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3",children:[e.jsx(L,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Messages"}
2)," let you chat directly with each vendor or team member, all in one place instead of texts and emails scattered everywhere. Conversations are saved per wedding so nothing gets lost in your inbox."]})]}),e.jsx(Ht,{weddingId:s,weddingQueryParam:i,team:c,role:u||""})]}),e.jsxs(ne,{value:"coordination",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3",children:[e.jsx(ve,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Coordination Notes"})," are the quick reminders the whole team should see. Parking instructions, pronunciation of names, allergies, special requests, anything you'd otherwise have to repeat to every vendor. Write it once and your team can read it anytime."]})]}),e.jsx(Wt,{weddingId:s,weddingQueryParam:i,canManage:y})]}),e.jsxs(ne,{value:"activity",className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/40 bg-[#faf6f3] p-3 flex items-start gap-3",children:[e.jsx(Se,{className:"w-4 h-4 text-[#A8836F] mt-0.5 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[e.jsx("span",{className:"font-medium text-foreground",children:"Activity"})," is the running log of what your team has been up to. New uploads, status changes, messages, completed tasks. A quick way to catch up on everything that's happened since you last checked in."]})]}),e.jsx(Lt,{weddingId:s})]})]})]})]})}export{Kn 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.