PageSourceSearch

https://macaly-agda8b6axs6mvuap5c1sr26z.macaly.app/assets/boeken-6hzBJSCT.js

js macaly-agda8b6axs6mvuap5c1sr26z.macaly.app collected 2026-10-03 04:59:15 UTC 23,935 bytes, 6 lines download raw bytes

1import{r as u,d as S,u as W,e as $,j as e}from"./index-DL8zpwKm.js";import{a as v}from"./api-Oj1yXquZ.js";const L=(...n)=>n.filter((s,c,d)=>!!s&&s.trim()!==""&&d.indexOf(s)===c).join(" ").trim();const z=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const G=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,c,d)=>d?d.toUpperCase():c.toLowerCase());const P=n=>{const s=G(n);return s.charAt(0).toUpperCase()+s.slice(1)};var O={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _=n=>{for(const s in n)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const U=u.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:d,className:i="",children:l,iconNode:t,...x},o)=>u.createElement("svg",{ref:o,...O,width:s,height:s,stroke:n,strokeWidth:d?Number(c)*24/Number(s):c,className:L("lucide",i),...!l&&!_(x)&&{"aria-hidden":"true"},...x},[...t.map(([j,D])=>u.createElement(j,D)),...Array.isArray(l)?l:[l]]));const F=(n,s)=>{const c=u.forwardRef(({className:d,...i},l)=>u.createElement(U,{ref:l,iconNode:s,className:L(`lucide-${z(P(n))}`,`lucide-${n}`,d),...i}));return c.displayName=P(n),c};const R=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Y=F("chevron-left",R);const Z=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],J=F("chevron-right",Z),I=[{id:"eenmalige-huur",label:"Eenmalige huur",sublabel:"Per dagdeel — excl. BTW",price:"€100",description:"De volledige ruimte exclusief voor u — voor een workshop, sessie of vergadering.",accentClass:"border-terracotta",labelClass:"text-terracotta",needsDatum:!0,isCard:!1},{id:"beurt-5x",label:"5-beurtenkaart",sublabel:"€75/beurt · totaal €375",price:"€375",description:"Koop 5 beurten vooraf aan verlaagd tarief. Gebruik ze op 5 data naar keuze.",accentClass:"border-terracotta",labelClass:"text-terracotta",needsDatum:!1,isCard:!0,kaartType:"kaart-5x"},{id:"beurt-cowork-halve",label:"Focus & co-work — halve dag",sublabel:"10-beurtenkaart · VM of NM",price:"€250",description:"Elke maandag — voormiddag of namiddag. Max. 4 ondernemers. Op uitnodiging.",accentClass:"border-sage",labelClass:"text-sage",needsDatum:!1,isCard:!0,kaartType:"kaart-cowork-halve"},{id:"beurt-cowork-vol",label:"Focus & co-work — volledige dag",sublabel:"10-beurtenkaart · VM + NM",price:"€370",description:"Elke maandag — volledige dag. Max. 4 ondernemers. Op uitnodiging.",accentClass:"border-sage",labelClass:"text-sage",needsDatum:!1,isCard:!0,kaartType:"kaart-cowork-vol"}],q=[{id:"voormiddag",label:"Voormiddag",sub:"9u00 – 12u30"},{id:"namiddag",label:"Namiddag",sub:"13u30 – 17u00"},{id:"avond",label:"Avond",sub:"18u00 – 21u00"}];function B({step:n}){const s=["Product","Datum & dagdeel","Gegevens","Bevestig"];return e.jsx("div",{className:"flex items-center justify-center gap-0 mb-12",children:s.map((c,d)=>{const i=d+1,l=n>i,t=n===i;return e.jsxs("div",{className:"flex items-center",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-xs font-light transition-colors ${l||t?"bg-terracotta text-white":"bg-ivory-mid text-ink-muted border border-ivory-deep"}`,children:l?e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):i}),e.jsx("span",{className:`text-[10px] tracking-[0.15em] uppercase font-light mt-1.5 hidden sm:block ${t?"text-terracotta":"text-ink-muted"}`,children:c})]}),d<s.length-1&&e.jsx("div",{className:`w-12 sm:w-20 h-px mx-1 sm:mx-2 mb-4 ${n>i?"bg-terracotta":"bg-ivory-deep"}`})]},i)})})}const Q=["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],H=["Ma","Di","Wo","Do","Vr","Za","Zo"];function X({selected:n,onSelect:s,isCowork:c}){const d=new Date,[i,l]=u.useState(d.getFullYear()),[t,x]=u.useState(d.getMonth()+1),o=$(v.bookings.getMonthAvailability,{year:i,month:t,isCowork:c}),j=a=>String(a).padStart(2,"0"),M=(new Date(i,t-1,1).getDay()+6)%7,A=new Date(i,t,0).getDate(),f=()=>{t===1?(x(12),l(a=>a-1)):x(a=>a-1)},w=()=>{t===12?(x(1),l(a=>a+1)):x(a=>a+1)},p=d.getFullYear()*100+(d.getMonth()+1),E=i*100+t>p,C=[...Array(M).fill(null),...Array.from({length:A},(a,m)=>m+1)];for(;C.length%7!==0;)C.push(null);return e.jsxs("div",{className:"border border-ivory-deep bg-card p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("button",{onClick:f,disabled:!E,className:"p-1 text-ink-muted hover:text-ink disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Vorige maand",children:e.jsx(Y,{size:18})}),e.jsxs("span",{className:"text-sm font-light tracking-[0.1em] uppercase text-ink",children:[Q[t-1]," ",i]}),e.jsx("button",{onClick:w,className:"p-1 text-ink-muted hover:text-ink transition-colors","aria-label":"Volgende maand",children:e.jsx(J,{size:18})})]}),e.jsx("div",{className:"grid grid-cols-7 mb-1",children:H.map(a=>e.jsx("div",{className:"text-center text-[10px] tracking-[0.15em] uppercase text-ink-muted font-light py-1",children:a},a))}),e.jsx("div",{className:"grid grid-cols-7 gap-0.5",children:C.map((a,m)=>{if(!a)return e.jsx("div",{},`empty-${m}`);const r=`${i}-${j(t)}-${j(a)}`,h=o?.[r],k=n===r,V=!o;let N="",y="",K="cursor-pointer",T="";return V?(N="bg-ivory-deep/40 animate-pulse",y="text-ink-muted",K="cursor-wait"):h==="unavailable"?(N="bg-red-50",y="text-red-300 line-through",K="cursor-not-allowed",T="Niet beschikbaar"):h==="partial"?(N=k?"bg-amber-400":"bg-amber-50 hover:bg-amber-100",y=k?"text-white font-medium":"text-amber-700",T="Gedeeltelijk beschikbaar"):h==="available"?(N=k?"bg-sage":"bg-green-50 hover:bg-green-100",y=k?"text-white font-medium":"text-green-700",T="Beschikbaar"):(N="bg-ivory-deep/30",y="text-ink-muted",K="cursor-not-allowed"),e.jsx("button",{title:T,disabled:!V&&h==="unavailable",onClick:()=>h!=="unavailable"&&s(r),className:`
2                relative aspect-square flex items-center justify-center text-sm font-light
3                transition-colors rounded-sm
4                ${N} ${y} ${K}
5                ${k?"ring-2 ring-offset-1 ring-sage":""}
6              `,children:a},r)})}),e.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-3 border-t border-ivory-deep flex-wrap",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-ink-muted font-light",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-green-100 border border-green-300 inline-block"}),"Beschikbaar"]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-ink-muted font-light",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-amber-100 border border-amber-300 inline-block"}),"Gedeeltelijk"]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-ink-muted font-light",children:[e.jsx("span",{className:"w-3 h-3 rounded-sm bg-red-50 border border-red-200 inline-block"}),"Niet beschikbaar"]})]})]})}function ae(){const[n,s]=u.useState(1),[c,d]=u.useState(!1),[i,l]=u.useState(""),[t,x]=u.useState({naam:"",email:"",telefoon:"",datum:"",dagdeel:"",productType:"",opmerking:"",wantsFactuur:!1,factuurAdres:"",btwNummer:"",discountCode:"",useBeurtKaart:!1,selectedKaartId:""}),o=(a,m)=>x(r=>({...r,[a]:m})),j=S(v.bookings.createPendingBooking),D=S(v.bookings.createBeurtBooking),M=S(v.beurtenkaarten.createPendingKaart),A=W(v.mollie.createPayment),f=$(v.bookings.getKaartenByEmail,t.email.length>4?{email:t.email}:"skip"),w=t.productType==="beurt-cowork-vol"?"volledig":t.dagdeel,p=$(v.bookings.checkAvailability,t.datum&&w?{datum:t.datum,dagdeel:w}:"skip"),b=I.find(a=>a.id===t.productType);if(n===1)return e.jsx("main",{className:"min-h-screen bg-background pt-24 pb-20 px-6",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("p",{className:"text-[10px] tracking-[0.4em] uppercase text-ink-muted font-light mb-4",children:"Stap 1 van 4"}),e.jsx("h1",{className:"font-display text-4xl sm:text-5xl text-ink font-light mb-4",children:"Kies je formule"})]}),e.jsx(B,{step:1}),e.jsx("div",{className:"space-y-4",children:I.map(a=>e.jsx("button",{onClick:()=>{o("productType",a.id),o("dagdeel",""),o("datum",""),s((a.needsDatum,2))},className:`w-full text-left border bg-card p-6 transition-all hover:border-terracotta group ${t.productType===a.id?`${a.accentClass} shadow-sm`:"border-ivory-deep"}`,children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:`text-[10px] tracking-[0.3em] uppercase font-light mb-1 ${a.labelClass}`,children:a.sublabel}),e.jsx("h2",{className:"font-display text-2xl text-ink font-light mb-2",children:a.label}),e.jsx("p",{className:"text-sm text-ink-soft font-light leading-relaxed",children:a.description})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("span",{className:`font-display text-3xl font-light ${a.labelClass}`,children:a.price}),e.jsx("p",{className:"text-[10px] text-ink-muted font-light mt-0.5",children:"excl. BTW"})]})]})},a.id))}),e.jsxs("p",{className:"text-center text-[11px] text-ink-muted font-light mt-8",children:["Vragen? ",e.jsx("a",{href:"mailto:[email protected]",className:"text-terracotta hover:underline",children:"[email protected]"})]})]})});if(n===2){const a=t.productType?.startsWith("beurt-cowork"),m=t.productType==="beurt-cowork-vol";return b?.isCard&&t.productType?.startsWith("beurt-cowork"),e.jsx("main",{className:"min-h-screen bg-background pt-24 pb-20 px-6",children:e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("p",{className:"text-[10px] tracking-[0.4em] uppercase text-ink-muted font-light mb-4",children:"Stap 2 van 4"}),e.jsx("h1",{className:"font-display text-4xl sm:text-5xl text-ink font-light mb-2",children:a||b?.isCard?"Eerste datum kiezen":"Kies datum & dagdeel"}),b?.isCard&&e.jsx("p",{className:"text-sm text-ink-soft font-light mt-2",children:a?"Co-work is elke maandag. Kies uw eerste maandag.":"Kies de eerste datum van uw beurtenkaart."})]}),e.jsx(B,{step:2}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-3",children:"Datum"}),e.jsx(X,{selected:t.datum,onSelect:r=>o("datum",r),isCowork:a}),t.datum&&e.jsxs("p",{className:"text-xs text-ink-soft font-light mt-2 text-center",children:["Geselecteerd: ",e.jsx("span",{className:"text-ink font-normal",children:new Date(t.datum+"T12:00:00").toLocaleDateString("nl-BE",{weekday:"long",day:"numeric",month:"long",year:"numeric"})})]})]}),m?e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-3",children:"Dagdeel"}),e.jsxs("div",{className:"border border-sage bg-sage-light/30 p-4",children:[e.jsx("p",{className:"text-sm text-ink font-light",children:"Volledige dag"}),e.jsx("p",{className:"text-[11px] text-ink-muted font-light mt-0.5",children:"9u00 – 17u00 (voormiddag + namiddag)"})]})]}):e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-3",children:"Dagdeel"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:q.filter(r=>a?r.id!=="avond":!0).map(r=>e.jsxs("button",{onClick:()=>o("dagdeel",r.id),className:`border p-4 text-left transition-all ${t.dagdeel===r.id?"border-terracotta bg-terracotta-light":"border-ivory-deep bg-card hover:border-terracotta"}`,children:[e.jsx("p",{className:"text-sm text-ink font-light",children:r.label}),e.jsx("p",{className:"text-[11px] text-ink-muted font-light mt-0.5",children:r.sub})]},r.id))})]}),p!==void 0&&t.datum&&(w||m)&&e.jsxs("div",{className:`flex items-center gap-2 px-4 py-3 text-sm font-light rounded-sm ${p.available?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-600 border border-red-200"}`,children:[e.jsx("span",{className:"text-base",children:p.available?"✓":"✗"}),p.available?"Dit dagdeel is vrij — je kunt verder.":"Dit dagdeel is niet beschikbaar voor deze datum."]})]}),e.jsxs("div",{className:"flex gap-4 mt-10",children:[e.jsx("button",{onClick:()=>s(1),className:"flex-1 border border-ivory-deep px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light text-ink-soft hover:border-ink transition-colors",children:"Terug"}),e.jsx("button",{onClick:()=>
6{if(!t.datum)return l("Kies een datum");if(!m&&!t.dagdeel)return l("Kies een dagdeel");if(a&&new Date(t.datum+"T12:00:00").getDay()!==1)return l("Co-work is alleen op maandag beschikbaar");if(!a&&new Date(t.datum+"T12:00:00").getDay()===1)return l("Maandag is voorbehouden voor co-work. Kies een andere dag.");if(p&&!p.available)return l("Deze datum is geblokkeerd. Kies een andere datum.");m&&x(r=>({...r,dagdeel:"volledig"})),l(""),s(3)},className:"flex-1 bg-terracotta text-white px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light hover:bg-terracotta/90 transition-colors",children:"Verder"})]}),i&&e.jsx("p",{className:"text-terracotta text-sm font-light mt-3 text-center",children:i})]})})}if(n===3){const m=f&&f.length>0&&(t.productType==="eenmalige-huur"||t.productType==="beurt-5x"||t.productType?.startsWith("beurt-cowork"));return e.jsx("main",{className:"min-h-screen bg-background pt-24 pb-20 px-6",children:e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("p",{className:"text-[10px] tracking-[0.4em] uppercase text-ink-muted font-light mb-4",children:"Stap 3 van 4"}),e.jsx("h1",{className:"font-display text-4xl sm:text-5xl text-ink font-light",children:"Uw gegevens"})]}),e.jsx(B,{step:3}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Naam *"}),e.jsx("input",{type:"text",value:t.naam,onChange:r=>o("naam",r.target.value),placeholder:"Voor- en achternaam",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"E-mailadres *"}),e.jsx("input",{type:"email",value:t.email,onChange:r=>o("email",r.target.value),placeholder:"[email protected]",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Telefoonnummer *"}),e.jsx("input",{type:"tel",value:t.telefoon,onChange:r=>o("telefoon",r.target.value),placeholder:"+32 4...",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted"})]}),m&&e.jsxs("div",{className:"border border-sage bg-sage-light/40 p-5",children:[e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.useBeurtKaart,onChange:r=>o("useBeurtKaart",r.target.checked),className:"mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-ink font-light",children:"Ik heb al een beurtenkaart"}),e.jsx("p",{className:"text-[11px] text-ink-muted font-light mt-0.5",children:"Gebruik een beurt van uw bestaande kaart — geen betaling nodig"})]})]}),t.useBeurtKaart&&f&&f.length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Selecteer uw beurtenkaart"}),e.jsxs("select",{value:t.selectedKaartId,onChange:r=>o("selectedKaartId",r.target.value),className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta",children:[e.jsx("option",{value:"",children:"— Kies een kaart —"}),f.map(r=>e.jsxs("option",{value:r._id,children:[r.kaartType," — ",r.remainingBeurten," beurten resterend"]},r._id))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Opmerking (optioneel)"}),e.jsx("textarea",{value:t.opmerking,onChange:r=>o("opmerking",r.target.value),rows:3,placeholder:"Extra info voor Maya...",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted resize-none"})]}),!t.useBeurtKaart&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Kortingscode (optioneel)"}),e.jsx("input",{type:"text",value:t.discountCode,onChange:r=>o("discountCode",r.target.value.toUpperCase()),placeholder:"CODE",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted uppercase tracking-wider"})]}),e.jsx("div",{children:e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.wantsFactuur,onChange:r=>o("wantsFactuur",r.target.checked)}),e.jsx("span",{className:"text-sm text-ink-soft font-light",children:"Factuur met BTW-nummer / adres"})]})}),t.wantsFactuur&&e.jsxs("div",{className:"space-y-4 pl-6 border-l-2 border-ivory-deep",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"Facturatieadres"}),e.jsx("textarea",{value:t.factuurAdres,onChange:r=>o("factuurAdres",r.target.value),rows:2,placeholder:"Straat, nr, postcode, gemeente",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted resize-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] tracking-[0.3em] uppercase text-ink-muted font-light mb-2",children:"BTW-nummer"}),e.jsx("input",{type:"text",value:t.btwNummer,onChange:r=>o("btwNummer",r.target.value),placeholder:"BE 0xxx.xxx.xxx",className:"w-full border border-ivory-deep bg-card px-4 py-3 text-ink font-light focus:outline-none focus:border-terracotta transition-colors placeholder:text-ink-muted"})]})]})]}),e.jsxs("div",{className:"flex gap-4 mt-10",children:[e.jsx("button",{onClick:()=>s(2),className:"flex-1 border border-ivory-deep px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light text-ink-soft hover:border-ink transition-colors",children:"Terug"}),e.jsx("button",{onClick:()=>
6{if(!t.naam.trim())return l("Vul uw naam in");if(!t.email.trim())return l("Vul uw e-mailadres in");if(!t.telefoon.trim())return l("Vul uw telefoonnummer in");if(t.useBeurtKaart&&!t.selectedKaartId)return l("Selecteer een beurtenkaart");l(""),s(4)},className:"flex-1 bg-terracotta text-white px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light hover:bg-terracotta/90 transition-colors",children:"Verder"})]}),i&&e.jsx("p",{className:"text-terracotta text-sm font-light mt-3 text-center",children:i})]})})}const E={voormiddag:"Voormiddag (9u00–12u30)",namiddag:"Namiddag (13u30–17u00)",avond:"Avond (18u00–21u00)",volledig:"Volledige dag (9u00–17u00)"},C=async()=>{d(!0),l("");try{if(t.useBeurtKaart&&t.selectedKaartId){const k=await D({naam:t.naam,email:t.email,telefoon:t.telefoon,datum:t.datum,dagdeel:t.dagdeel,productType:t.productType,beurtenkaartId:t.selectedKaartId,opmerking:t.opmerking||void 0});window.location.href=`/bedankt?booking=${k}&type=beurt`;return}const a=b?.isCard&&!t.useBeurtKaart;let m,r;a?r=await M({naam:t.naam,email:t.email,telefoon:t.telefoon,kaartType:b.kaartType,opmerking:t.opmerking||void 0,factuurAdres:t.factuurAdres||void 0,btwNummer:t.btwNummer||void 0}):m=await j({naam:t.naam,email:t.email,telefoon:t.telefoon,datum:t.datum,dagdeel:t.dagdeel,productType:t.productType,opmerking:t.opmerking||void 0,factuurAdres:t.factuurAdres||void 0,btwNummer:t.btwNummer||void 0});const h=await A({productType:t.productType,bookingId:m,kaartId:r,naam:t.naam,email:t.email,datum:t.datum||void 0,dagdeel:t.dagdeel||void 0,discountCode:t.discountCode||void 0,siteUrl:window.location.origin});if(h.url)window.location.href=h.url;else throw new Error("Geen betaallink ontvangen")}catch(a){console.error("[boeken] error during checkout",a),l(a instanceof Error?a.message:"Er is iets fout gegaan. Probeer opnieuw."),d(!1)}};return e.jsx("main",{className:"min-h-screen bg-background pt-24 pb-20 px-6",children:e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("p",{className:"text-[10px] tracking-[0.4em] uppercase text-ink-muted font-light mb-4",children:"Stap 4 van 4"}),e.jsx("h1",{className:"font-display text-4xl sm:text-5xl text-ink font-light",children:"Bevestig uw boeking"})]}),e.jsx(B,{step:4}),e.jsxs("div",{className:"border border-ivory-deep bg-card p-8 mb-8 space-y-4",children:[e.jsx("h2",{className:"font-display text-2xl text-ink font-light mb-6",children:"Overzicht"}),e.jsx(g,{label:"Formule",value:b?.label??""}),t.datum&&e.jsx(g,{label:"Datum",value:t.datum}),t.dagdeel&&e.jsx(g,{label:"Dagdeel",value:E[t.dagdeel]??t.dagdeel}),e.jsx(g,{label:"Naam",value:t.naam}),e.jsx(g,{label:"E-mail",value:t.email}),e.jsx(g,{label:"Telefoon",value:t.telefoon}),t.opmerking&&e.jsx(g,{label:"Opmerking",value:t.opmerking}),t.discountCode&&e.jsx(g,{label:"Kortingscode",value:t.discountCode}),t.useBeurtKaart&&e.jsx(g,{label:"Betaling",value:"Via beurtenkaart"}),e.jsx("div",{className:"border-t border-ivory-deep pt-4 mt-4",children:e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("span",{className:"text-sm text-ink-muted font-light",children:"Totaal excl. BTW"}),e.jsx("span",{className:"font-display text-3xl text-terracotta font-light",children:t.discountCode?"€0":b?.price??""})]})})]}),e.jsx("p",{className:"text-[11px] text-ink-muted font-light text-center mb-8",children:t.useBeurtKaart?"U wordt doorgestuurd naar de bevestigingspagina.":"U wordt doorgestuurd naar Mollie voor veilig betalen. Bancontact en creditcard worden geaccepteerd."}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("button",{onClick:()=>s(3),disabled:c,className:"flex-1 border border-ivory-deep px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light text-ink-soft hover:border-ink transition-colors disabled:opacity-50",children:"Terug"}),e.jsx("button",{onClick:C,disabled:c,className:"flex-1 bg-terracotta text-white px-6 py-3.5 text-xs tracking-[0.2em] uppercase font-light hover:bg-terracotta/90 transition-colors disabled:opacity-50 flex items-center justify-center gap-2",children:c?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]}),"Even geduld…"]}):t.useBeurtKaart?"Bevestig boeking":"Ga naar betaling"})]}),i&&e.jsx("p",{className:"text-terracotta text-sm font-light mt-3 text-center",children:i})]})})}function g({label:n,value:s}){return e.jsxs("div",{className:"flex items-start justify-between gap-4 text-sm",children:[e.jsx("span",{className:"text-ink-muted font-light",children:n}),e.jsx("span",{className:"text-ink font-light text-right",children:s})]})}export{ae as component};

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.