1var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(t,s,l)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[s]=l,n=(e,t)=>{for(var s in t||(t={}))a.call(t,s)&&o(e,s,t[s]);if(l)for(var s of l(t))r.call(t,s)&&o(e,s,t[s]);return e},i=(e,l)=>t(e,s(l)),d=(e,t,s)=>new Promise(((l,a)=>{var r=e=>{try{n(s.next(e))}catch(t){a(t)}},o=e=>{try{n(s.throw(e))}catch(t){a(t)}},n=e=>e.done?l(e.value):Promise.resolve(e.value).then(r,o);n((s=s.apply(e,t)).next())}));import{j as c}from"./ui-vendor-Bh7_beny.js";import{d as u,c as m,r as b,N as p}from"./react-vendor-BoSAEcqU.js";import{j as x,i as h}from"./firebase-vendor-DblBUUbW.js";import{p as f,d as j,bq as v,bn as g,bv as w,bw as N,bx as y,bp as k,by as I,bz as P,V as C,bA as S,bB as B,bC as D,bD as G,bE as O,bF as V,bG as E,bH as F,bI as M,bJ as z,bK as R,bL as T,bM as H,bN as W,bO as A,bP as J,bQ as U,x as K,bR as L,bS as $,bT as Y,bU as q,aU as Q,bV as _,bW as X}from"./index-IinEbi41.js";import{I as Z}from"./ImageDropField-GwxBXFpg.js";import{V as ee}from"./VideoField-BHlYmdmf.js";import{P as te}from"./ProjectShell-dK8tRMZr.js";import{E as se}from"./ExhibitorShell-CHq0uWOP.js";import{B as le}from"./BoothScene-C0mcrUWX.js";import{u as ae}from"./useBoothScene-DKtYGpm6.js";import{u as re}from"./useShowcaseProducts-BrISfWgV.js";import"./fabric-vendor-T6PTpD9i.js";import"./index.module-DjHmMTOo.js";import"./crop-BFimjs_K.js";import"./youtube-tFVCL-wO.js";import"./AdminShell-ADtbTeyw.js";import"./rotate-ccw-CrcgHT5Z.js";import"./arrow-left-BrJBGWSN.js";import"./send-DlR3fIA2.js";import"./user-BSHBAeXR.js";import"./useProjectShell-Bi5VYpE0.js";import"./resetAllFloorplanStores-BqByHRA7.js";import"./TrashIcon-BGnRVOUo.js";import"./PencilIcon-CV81eE09.js";import"./pin-DVUlEbsH.js";import"./minimize-2-Bg2--4dJ.js";import"./sidebarMenuConfig-DQIot0Wm.js";
1import"./building-2-D5X7dcSf.js";import"./ruler-BmfflDlq.js";import"./rocket-Pzx9utRp.js";import"./clock-BNoH4qBR.js";import"./message-square-B0WZRk8c.js";import"./scan-line-ByZHStzT.js";import"./firestoreForms-DONSGZPr.js";import"./exhibitorMessagesService-HaOMo_Wj.js";import"./shellSchemeBooths-Da1NS1ep.js";import"./useExhibitorNewsBadge-DT3scBwa.js";import"./useLastVisit-VER2G7d3.js";import"./Texture-RZlMjO2q.js";import"./textures-g2aXi1S8.js";import"./scale-pYxn1nCc.js";import"./assetCatalog-BHI-c1l7.js";import"./Plant3D-Bds_dltm.js";import"./Html-DZRJ65Jp.js";import"./play-1fTsTigw.js";import"./hallDressing-BL9-UyEi.js";import"./OrbitControls-BemKf6mF.js";import"./showcaseProduct.types-C7GtjP5x.js";const oe=[{id:"preview-1",boothId:"preview",name:"Voorbeeldproduct 1",categoryId:"",tags:[],searchTokens:[]},{id:"preview-2",boothId:"preview",name:"Voorbeeldproduct 2",categoryId:"",tags:[],searchTokens:[]},{id:"preview-3",boothId:"preview",name:"Voorbeeldproduct 3",categoryId:"",tags:[],searchTokens:[]}],ne=W({whatsapp:_().max(30).or(X("")),website:_().max(120).or(X(""))}),ie="block text-sm font-medium text-slate-700 mb-1",de="w-full rounded-lg border border-slate-300 px-3 py-2 text-sm text-slate-900 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 outline-none";function ce({title:e,format:t,ratio:s,minW:l,minH:a,current:r,onFile:o,onRemove:n}){return c.jsxs("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:e}),c.jsxs("p",{className:"mb-3 text-xs text-slate-500",children:[t," · ratio ",s," · min. ",l," à ",a," px"]}),(null==r?void 0:r.url)&&c.jsxs("div",{className:"mb-3 flex items-center justify-between rounded-lg bg-slate-50 px-3 py-2 text-sm text-slate-700",children:[c.jsx("span",{className:"truncate",children:r.name||"afbeelding"}),c.jsx("button",{type:"button",onClick:n,className:"ml-2 text-red-600 hover:text-red-700","aria-label":`${e} verwijderen`,children:c.jsx(K,{size:16})})]}),c.jsx(Z,{ratio:s,validation:{minWidth:l,minHeight:a,maxSizeMB:10,allowedTypes:["image/jpeg","image/png"]},onChange:({converted:e,original:t})=>{const s=null!=e?e:t;s&&o(s)}})]})}function ue(){var e,t,s,l,a,r,o,W,K;const{projectId:_,standId:X}=u(),Z=m(),{doc:ue}=ae(_,X),me=_&&X?{projectId:_,standId:X}:null,{hasRole:be,isAdmin:pe,currentUser:xe}=f(),he=pe||be("admin")||be("project_manager"),[fe,je]=b.useState(!1),[ve,ge]=b.useState(!1);b.useEffect((()=>{if(he)return ge(!0),void je(!0);if(!(null==xe?void 0:xe.uid)||!X)return ge(!1),void je(!0);let e=!0;return x(h(j,"users",xe.uid)).then((t=>{var s;if(!e)return;const l=t.exists()&&Array.isArray(null==(s=t.data())?void 0:s.boothIds)?t.data().boothIds:[];ge(l.includes(X)),je(!0)})).catch((()=>{e&&(ge(!1),je(!0))})),()=>{e=!1}}),[he,null==xe?void 0:xe.uid,X]);const[we,Ne]=b.useState({type:null}),[ye,ke]=b.useState(!1),Ie=b.useRef(null),Pe=b.useRef(null),[Ce,Se]=b.useState({email:"",phone:""}),[Be,De]=b.useState(v);b.useEffect((()=>{if(!_)return;let e=!0;return g(_).then((t=>{e&&De(t)})).catch((()=>{})),()=>{e=!1}}),[_]);const Ge=null!=(e=Be.defaultTemplate)?e:w,Oe=null!=(t=ue.template)?t:Ge,Ve=null!=(s=ue.offeringDisplayMode)?s:Be.offeringDisplayMode,Ee=null!=(l=ue.offeringBackwallColor)?l:Be.offeringBackwallColor,{productsByBooth:Fe}=re(void 0,_),Me=null!=(a=Fe.get(null!=X?X:""))?a:[],ze=0===Me.length,Re=ze?oe:Me,[Te,He]=b.useState(!1);b.useEffect((()=>{He(!1)}),[Ve]);const{register:We,handleSubmit:Ae,reset:Je}=N({resolver:y(ne),defaultValues:{whatsapp:"",website:""}});if(b.useEffect((()=>{var e,t,s,l;Je({whatsapp:null!=(t=null==(e=ue.contact)?void 0:e.whatsapp)?t:"",website:null!=(l=null==(s=ue.contact)?void 0:s.website)?l:""})}),[ue,Je]),b.useEffect((()=>{if(!_||!X)return;if(!fe||!ve)return;let e=!0;return d(null,null,(function*(){var t;const s=yield k(_,X),l=yield I(_,null==s?void 0:s.userId,null!=(t=null==xe?void 0:xe.tenantId)?t:void 0);e&&Se(l)})),()=>{e=!1}}),[_,X,fe,ve,null==xe?void 0:xe.tenantId]),b.useEffect((()=>{var e,t,s,l;me&&(Ce.email||Ce.phone)&&fe&&ve&&(Ce.email===(null!=(t=null==(e=ue.contact)?void 0:e.email)?t:"")&&Ce.phone===(null!=(l=null==(s=ue.contact)?void 0:s.phone)?l:"")||P(me,i(n({}
1,ue.contact),{email:Ce.email||void 0,phone:Ce.phone||void 0})).catch((e=>{})))}),[Ce,null==(r=ue.contact)?void 0:r.email,null==(o=ue.contact)?void 0:o.phone,fe,ve]),b.useEffect((()=>{var e;Ne((null==(e=ue.video)?void 0:e.url)?{type:"upload",url:ue.video.url}:{type:null})}),[null==(W=ue.video)?void 0:W.url]),!me)return c.jsx("div",{className:"p-8 text-slate-600",children:"Geen stand geselecteerd (projectId/standId ontbreekt in de URL)."});const Ue=e=>t=>{C.promise(e(me,t),{loading:"Uploadenâ¦",success:"Geüpload",error:"Upload mislukt"})},Ke=Ae((e=>d(null,null,(function*(){ke(!0);try{yield P(me,{email:Ce.email||void 0,phone:Ce.phone||void 0,whatsapp:e.whatsapp.trim()||void 0,website:e.website.trim()||void 0}),C.success("Gegevens opgeslagen")}catch(t){C.error("Opslaan mislukt â probeer opnieuw")}finally{ke(!1)}})))),Le=c.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-start",children:[c.jsxs("div",{className:"w-full lg:w-[460px] lg:shrink-0",children:[c.jsx("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-slate-800",children:"Publicatiestatus"}),c.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:ue.published?"Gepubliceerd â je 3D-stand is zichtbaar op de plattegrond.":"Concept â je 3D-stand is nog verborgen op de plattegrond."})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[c.jsx("span",{className:"text-xs font-medium "+(ue.published?"text-slate-400":"text-slate-700"),children:"Concept"}),c.jsx("button",{type:"button",role:"switch","aria-checked":!!ue.published,"aria-label":"Publicatiestatus wisselen",disabled:!me,onClick:()=>me&&S(me,!ue.published),className:"relative inline-flex h-7 w-12 items-center rounded-full transition-colors "+(ue.published?"bg-blue-600":"bg-slate-300"),children:c.jsx("span",{className:"inline-block h-5 w-5 transform rounded-full bg-white shadow transition-transform "+(ue.published?"translate-x-6":"translate-x-1")})}),c.jsx("span",{className:"text-xs font-medium "+(ue.published?"text-blue-700":"text-slate-400"),children:"Gepubliceerd"})]})]})}),c.jsx("p",{className:"mb-6 text-sm text-slate-500",children:"Kies je stand-type, upload je beelden en video en vul je gegevens in. Rechts zie je direct een voorbeeld."}),c.jsxs("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:"Stand-type"}),c.jsx("p",{className:"mb-3 text-xs text-slate-500",children:"Je kunt later wisselen; je geüploade beelden blijven bewaard."}),c.jsxs("div",{className:"flex flex-col gap-2",children:[(()=>{var e,t;const s=null==ue.template,l=null!=(t=null==(e=B.find((e=>e.value===Ge)))?void 0:e.label)?t:Ge;return c.jsxs("button",{type:"button",onClick:()=>D(me,null),"aria-pressed":s,className:"rounded-lg border px-3 py-2 text-left transition "+(s?"border-blue-600 bg-blue-50":"border-slate-200 hover:border-slate-300"),children:[c.jsx("span",{className:"block text-sm font-semibold "+(s?"text-blue-700":"text-slate-800"),children:"Volg organisator"}),c.jsxs("span",{className:"block text-xs text-slate-500",children:["Gebruik het standaard stand-type van de beurs (",l,")."]})]})})(),B.map((e=>{const t=ue.template===e.value;return c.jsxs("button",{type:"button",onClick:()=>D(me,e.value),"aria-pressed":t,className:"rounded-lg border px-3 py-2 text-left transition "+(t?"border-blue-600 bg-blue-50":"border-slate-200 hover:border-slate-300"),children:[c.jsx("span",{className:"block text-sm font-semibold "+(t?"text-blue-700":"text-slate-800"),children:e.label}),c.jsx("span",{className:"block text-xs text-slate-500",children:e.description})]},e.value)}))]})]}),c.jsxs("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:"Videopresentatie (tv-scherm)"}),c.jsx("p",{className:"mb-3 text-xs text-slate-500",children:"MP4 · max 50 MB · max ~90 sec · ratio 16:9"}),c.jsx(ee,{value:we,onChange:e=>{var t;if(Ne(e),e.file&&e.file!==Ie.current){Ie.current=e.file;const{promise:t}=A(me,e.file);C.promise(t,{loading:"Video uploadenâ¦",success:"Video geüpload",error:"Upload mislukt"})}e.thumbnailFile&&e.thumbnailFile!==Pe.current&&(Pe.current=e.thumbnailFile,J(me,e.thumbnailFile).catch((e=>{}))),e.file||e.url||!(null==(t=ue.video)?void 0:t.url)||(Ie.current=null,Pe.current=null,U(me,ue.video.url))},maxSizeMB:50,allowYouTube:!1})]}),"truss"!==Oe&&c.jsx(ce,{title:"Achterwand-graphic",format:"JPG of PNG",ratio:"2.3:1",minW:1800,minH:780,current:ue.backdrop,onFile:Ue(L),onRemove:()=>{var e;return(null==(e=ue.backdrop)?void 0:e.url)&&G(me,ue.backdrop.url)}}),"truss"===Oe&&c.jsx(ce,{title:"Achterwand-doek (truss)",format:"JPG of PNG",ratio:"1.96:1",minW:2700,minH:1380,current:ue.trussBanner,onFile:Ue($),onRemove:()=>{var e;return(null==(e=ue.trussBanner)?void 0:e.url)&&O(me,ue.trussBanner.url)}}),c.jsx(ce,{title:"Balie-afbeelding / logo",format:"JPG of PNG",ratio:"1:1",minW:800,minH:800,current:ue.balie,onFile:Ue(Y),onRemove:()=>{var e;return(null==(e=ue.balie)?void 0:e.url)&&V(me,ue.balie.url)}}),"truss"!==Oe&&c.jsx(ce,{title:"Roll-up banner (links)",format:"JPG of PNG",ratio:"85:200",minW:850,minH:2e3,current:ue.banner,onFile:Ue(q),onRemove:()=>{var e;return(null==(e=ue.banner)?void 0:e.url)&&E(me,ue.banner.url)}}),c.jsxs("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:"Vloerkleur"}),c.jsx("p",{className:"mb-3 text-xs text-slate-500",children:"Kies de kleur van de vloer in je stand."}),c.jsx("div",{className:"flex flex-wrap gap-2",children:F.map((e=>{var t;const s=(null!=(t=ue.floorColor)?t:"white")===e.value;return c.jsxs("button",{type:"button",onClick:()=>M(me,e.value),"aria-pressed":s,title:e.label,className:"flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition "+(s?"border-blue-600 bg-blue-50 text-blue-700":"border-slate-200 text-slate-700 hover:border-slate-300"),children:[c.jsx("span",{className:"h-4 w-4 roun
1ded-full border border-slate-300",style:{background:e.hex}}),e.label]},e.value)}))})]}),c.jsxs("section",{className:"mb-6 rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:"Productweergave"}),c.jsx("p",{className:"mb-3 text-xs text-slate-500",children:"Hoe jouw producten in de 3D-stand worden getoond. Jouw keuze gaat vóór de standaard van de organisator."}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>R(me,null),className:"flex items-start gap-3 rounded-lg border px-3 py-2.5 text-left transition "+(ue.offeringDisplayMode?"border-slate-200 hover:border-slate-300":"border-blue-600 bg-blue-50"),children:[c.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border "+(ue.offeringDisplayMode?"border-slate-300":"border-blue-600"),children:!ue.offeringDisplayMode&&c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-600"})}),c.jsxs("span",{children:[c.jsx("span",{className:"block text-sm font-medium "+(ue.offeringDisplayMode?"text-slate-800":"text-blue-700"),children:"Volg de organisator"}),c.jsx("span",{className:"mt-0.5 block text-xs text-slate-500",children:"Gebruik de standaard die de organisator voor deze beurs heeft gekozen."})]})]}),z.map((e=>{const t=ue.offeringDisplayMode===e.value;return c.jsxs("button",{type:"button",onClick:()=>R(me,e.value),className:"flex items-start gap-3 rounded-lg border px-3 py-2.5 text-left transition "+(t?"border-blue-600 bg-blue-50":"border-slate-200 hover:border-slate-300"),children:[c.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border "+(t?"border-blue-600":"border-slate-300"),children:t&&c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-600"})}),c.jsxs("span",{children:[c.jsx("span",{className:"block text-sm font-medium "+(t?"text-blue-700":"text-slate-800"),children:e.label}),c.jsx("span",{className:"mt-0.5 block text-xs text-slate-500",children:e.hint})]})]},e.value)}))]}),"backwall"===ue.offeringDisplayMode&&c.jsxs("div",{className:"mt-3 rounded-lg border border-slate-100 bg-slate-50 p-3",children:[c.jsx("p",{className:"mb-2 text-xs font-medium text-slate-600",children:"Kleur van de slatwand"}),c.jsx("div",{className:"flex gap-2",children:T.map((e=>{var t;const s=(null!=(t=ue.offeringBackwallColor)?t:"white")===e.value;return c.jsxs("button",{type:"button",onClick:()=>H(me,e.value),className:"flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition "+(s?"border-blue-600 bg-blue-50 text-blue-700":"border-slate-200 text-slate-700 hover:border-slate-300"),children:[c.jsx("span",{className:"h-4 w-4 rounded-full border border-slate-300",style:{background:e.hex}}),e.label]},e.value)}))})]})]}),c.jsxs("form",{onSubmit:Ke,className:"rounded-xl border border-slate-200 bg-white p-4",children:[c.jsx("h2",{className:"mb-1 text-sm font-semibold text-slate-800",children:"Contact"}),c.jsx("p",{className:"mb-3 text-xs text-slate-500",children:"Bedrijfsnaam, e-mail en telefoon nemen we automatisch over uit je gegevens."}),c.jsxs("div",{className:"mb-3 rounded-lg bg-slate-50 px-3 py-2 text-sm",children:[c.jsxs("div",{className:"flex justify-between gap-2",children:[c.jsx("span",{className:"text-slate-500",children:"E-mail"}),c.jsx("span",{className:"truncate font-medium text-slate-800",children:Ce.email||"â"})]}),c.jsxs("div",{className:"mt-1 flex justify-between gap-2",children:[c.jsx("span",{className:"text-slate-500",children:"Telefoon"}),c.jsx("span",{className:"truncate font-medium text-slate-800",children:Ce.phone||"â"})]})]}),c.jsxs("div",{className:"mb-3",children:[c.jsx("label",{className:ie,htmlFor:"whatsapp",children:"WhatsApp"}),c.jsx("input",n({id:"whatsapp",className:de},We("whatsapp")))]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:ie,htmlFor:"website",children:"Website"}),c.jsx("input",n({id:"website",className:de,placeholder:"bijv. example.nl"},We("website")))]}),c.jsx("button",{type:"submit",disabled:ye,className:"w-full rounded-lg bg-blue-600 py-2.5 text-sm font-semibold text-white hover:bg-blue-700 disabled:opacity-60",children:ye?"Opslaanâ¦":"Gegevens opslaan"})]})]}),c.jsxs("div",{className:"relative w-full flex-1 overflow-hidden rounded-xl border border-slate-200 bg-[#fafafa] lg:sticky lg:top-4",style:{height:"min(70vh, 620px)"},children:[c.jsxs("div",{className:"absolute left-3 top-3 z-10 flex flex-col items-start gap-1",children:[c.jsx("span",{className:"rounded-full bg-white/90 px-3 py-1 text-xs font-medium text-slate-600 shadow",children:"Live voorbeeld"}),ze&&c.jsx("span",{className:"rounded-full bg-white/90 px-3 py-1 text-[11px] font-medium text-slate-500 shadow",children:"Voorbeeldproducten â je hebt nog geen showcase-producten"})]}),c.jsx(le,{doc:i(n({},ue),{template:Oe}),onInfo:()=>{},editable:!0,products:Re,offeringMode:Ve,offeringBackwallColor:Ee,offeringCount:Re.length,offeringsOpen:Te,onOpenOfferings:()=>He(!0),onCloseOfferings:()=>He(!1),assetTransforms:Be.assetTransforms})]})]}),$e="3D-stand inrichten",Ye=c.jsxs("button",{type:"button",onClick:()=>Z(`/projects/${_}/booth/${X}`),className:"inline-flex items-center gap-2 rounded-lg bg-blue-600 px-3 py-2 text-sm font-semibold text-white hover:bg-blue-700",children:[c.jsx(Q,{size:16})," Bekijk 3D-stand"]});return fe?ve?he?c.jsx(te,{projectId:_,title:$e,actions:Ye,children:Le}):c.jsx(se,{projectId:_,tenantId:null!=(K=null==xe?void 0:xe.tenantId)?K:void 0,userId:null==xe?void 0:xe.uid,title:$e,actions:Ye,children:Le}):c.jsx(p,{to:_?`/projects/${_}/exhibitor-dashboard`:"/",replace:!0}):c.jsx("div",{className:"p-8 text-slate-500",children:"Ladenâ¦"})}export{ue as BoothSetupPage}; 2//# sourceMappingURL=BoothSetupPage-CMQUJaXR.js.map
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.