import{r as u,j as e,Z as T,_ as S,$,f as A}from"./index-BUHDA7zi.js";const v=u.createContext(()=>{}),C=u.createContext(void 0),c={tenant:"spartacus",city:"liverpool",currency:"GBP",adultPackages:[{id:"united-60",name:"Bubble United",duration:"60 mins",desc:"Bubble Football",pricePerPerson:27.5,minPlayers:8,badge:null},{id:"united-90",name:"Bubble United 90",duration:"90 mins",desc:"Bubble Football",pricePerPerson:32.5,minPlayers:8,badge:null},{id:"cup",name:"Spartacus Cup",duration:"90 mins",desc:"Bubble Football + bubble games + football challenges + awards",pricePerPerson:37.5,minPlayers:10,badge:"popular"},{id:"double",name:"The Double",duration:"120 mins",desc:"Bubble Football + 1 bonus activity",pricePerPerson:47.5,minPlayers:10,badge:"best-value"},{id:"treble",name:"The Treble",duration:"180 mins",desc:"Bubble Football + 2 bonus activities",pricePerPerson:67.5,minPlayers:10,badge:null}],kidsPackages:[{id:"united-kids",name:"Bubble United Kids",duration:"60 mins",desc:"Bubble Football",priceLowBand:249,priceHighBand:299,badge:null},{id:"cup-kids",name:"Spartacus Cup Kids",duration:"90 mins",desc:"Bubble Football + games + awards",priceLowBand:349,priceHighBand:399,badge:"popular"},{id:"double-kids",name:"The Double Kids",duration:"120 mins",desc:"Bubble Football + 1 bonus activity",priceLowBand:449,priceHighBand:499,badge:"best-value"},{id:"treble-kids",name:"The Treble Kids",duration:"180 mins",desc:"Bubble Football + 2 bonus activities",priceLowBand:649,priceHighBand:699,badge:null}],groupDiscount:{enabled:!0,thresholdPlayers:14,percentage:10,appliesTo:["united-60","united-90","cup","double","treble"],showProgressNudge:!0},kidsBands:{lowBandMax:12,highBandMax:20},kidsDeposit:50,balanceDueDays:14,playerRange:{min:8,max:30,default:12},childRange:{min:6,max:20,default:12}},s={pageBg:"#0d0f0d",cardBg:"#141714",border:"#2a2e2a",green:"#97C459",greenText:"#173404",body:"#ffffff",muted:"#888780",secondary:"#B4B2A9",warning:"#EF9F27"},L=r=>Math.round(r*20)/20,j=(r,a=2)=>`£${r.toLocaleString("en-GB",{minimumFractionDigits:a,maximumFractionDigits:a})}`,b=r=>`£${Math.round(r).toLocaleString("en-GB")}`;function E({city:r=c.city,background:a,id:o,defaultAudience:n="adults",onAudienceChange:d}={}){const[t,l]=u.useState(n),x=f=>{l(f),d==null||d(f)},[i,p]=u.useState(c.playerRange.default),[m,h]=u.useState(c.childRange.default),[g,y]=u.useState(null),N=f=>y(f);return e.jsx(C.Provider,{value:r??void 0,children:e.jsxs(v.Provider,{value:N,children:[e.jsx("section",{id:o,"aria-label":"Packages and prices",style:{backgroundColor:a??s.pageBg,color:s.body},className:"py-16 md:py-24 px-4",children:e.jsxs("div",{className:"container mx-auto max-w-6xl",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.25em] mb-3",style:{color:s.green},children:"Packages & prices"}),e.jsxs("h2",{className:"font-display text-4xl md:text-6xl italic font-black uppercase tracking-tight leading-[0.95]",children:[e.jsx("span",{style:{color:s.body},children:"Choose your"})," ",e.jsx("span",{style:{color:s.green},children:"experience"})]})]}),e.jsx(D,{value:t,onChange:x}),t==="adults"?e.jsx(M,{players:i,setPlayers:p}):e.jsx(O,{children:m,setChildren:h})]})}),g&&e.jsx(T,{open:!!g,onClose:()=>y(null),...g})]})})}function D({value:r,onChange:a}){const o=["adults","kids"],n=u.useRef(null),d=t=>{var p;if(t.key!=="ArrowLeft"&&t.key!=="ArrowRight")return;t.preventDefault();const l=o.indexOf(r),x=t.key==="ArrowRight"?(l+1)%o.length:(l-1+o.length)%o.length;a(o[x]);const i=(p=n.current)==null?void 0:p.querySelector(`[data-tab="${o[x]}"]`);i==null||i.focus()};return e.jsx("div",{role:"tablist","aria-label":"Audience",ref:n,onKeyDown:d,className:"flex justify-center gap-2 mb-8",children:o.map(t=>{const l=r===t;return e.jsx("button",{role:"tab","data-tab":t,"aria-selected":l,tabIndex:l?0:-1,onClick:()=>a(t),className:"min-w-[140px] px-6 py-3 text-sm font-bold uppercase tracking-wide rounded-[8px] border-2 transition-colors focus:outline-none",style:{backgroundColor:l?s.green:"transparent",color:l?s.greenText:s.body,borderColor:l?s.green:s.border},children:t==="adults"?"Adults":"KIDS (7–15)"},t)})})}function M({players:r,setPlayers:a}){const{thresholdPlayers:o,percentage:n,enabled:d}=c.groupDiscount,t=r<o,l=Math.max(0,o-r);return e.jsxs("div",{children:[e.jsxs(P,{children:[e.jsx("span",{className:"inline-flex items-center justify-center rounded-full text-[10px] font-bold uppercase tracking-widest px-2.5 py-1 mr-3 align-middle",style:{backgroundColor:s.body,color:s.pageBg},children:"New"}),e.jsxs("span",{className:"align-middle",style:{color:s.body},children:[e.jsx("strong",{children:"Individual payments"})," ",e.jsx("span",{style:{color:s.secondary},children:"— everyone pays their own. No fronting the cash, no chasing the group."})]})]}),e.jsx(k,{label:d?`GROUP DISCOUNT — ${o}+ PLAYERS SAVE ${n}%, APPLIED AUTOMATICALLY`:"SET YOUR GROUP SIZE",stepperLabel:"players",value:r,min:c.playerRange.min,max:c.playerRange.max,onChange:a,singularNoun:"player",pluralNoun:"players",nudge:d?t?`Add ${l} more ${l===1?"player":"players"} and ${n}% comes off every package.`:`${n}% group discount applied to every package.`:null,nudgeActive:d&&!t}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5 mt-8",children:[...c.adultPackages].sort((x,i)=>x.pricePerPerson-i.pricePerPerson).map(x=>e.jsx(R,{pkg:x,groupSize:r},x.id))}),e.jsx(w,{pill:"SPARTACUS SPLIT PAY",heading:"Individual payments. No chasing the group.",body:"You pay for your own place to lock the date in. Everyone else pays theirs in the portal, in their own time. No fronting hundreds of pounds, no group chat full of “sent you it mate”."}),e.jsx(B,{})]})}function R({pkg:r,groupSize:a}){const o=u.useContext(v),n=u.useContext(C),{enabled:d,thresholdPlayers:t,percentage:l,appliesTo:x}=c.groupDiscount,i=Math.max(a,r.minPlayers),p=d&&a>=t&&x.includes(r.id),m=p?L(r.pricePerPerson*(1-l/100)):r.pricePerPerson,h=m*i,g=p?r.pricePerPerson*(l/100)*i:0,y=a<r.minPlayers,N=r.badge==="popular"?{border:`2px solid ${s.green}`}:r.badge==="best-value"?{border:`1px solid ${s.green}`}:{border:`1px solid ${s.border}`};return e.jsxs("article",{className:"rounded-[12px] flex flex-col overflow-hidden",style:{backgroundColor:s.cardBg,...N},children:[e.jsxs("div",{className:"p-5 flex-1",children:[r.badge&&e.jsx("div",{className:"mb-3",children:e.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold uppercase tracking-widest rounded-full px-2.5 py-1",style:{backgroundColor:r.badge==="popular"?s.green:"transparent",color:r.badge==="popular"?s.greenText:s.green,border:r.badge==="best-value"?`1px solid ${s.green}`:"none"},children:r.badge==="popular"?"★ Most popular":r.badge==="best-value"?"⭐ Best Value":"New"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"font-display text-xl md:text-2xl italic font-black uppercase tracking-tight leading-tight",style:{color:s.body},children:r.name}),e.jsxs("p",{className:"text-sm mt-1",style:{color:s.secondary},children:[r.duration," • ",r.desc]}),y&&e.jsxs("p",{className:"text-xs mt-2 font-medium",style:{color:s.warning},children:["Minimum ",r.minPlayers," players — priced at ",r.minPlayers]})]}),e.jsx("div",{className:"sm:hidden -mx-5 border-t",style:{borderColor:s.border},"aria-hidden":!0}),e.jsxs("div",{className:"text-left sm:text-right shrink-0","aria-live":"polite",children:[p&&e.jsx("div",{className:"text-sm line-through",style:{color:s.muted},children:j(r.pricePerPerson)}),e.jsx("div",{className:"font-display text-3xl md:text-4xl italic font-black leading-none",style:{color:p?s.green:s.body},children:j(m)}),e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest mt-1",style:{color:s.muted},children:"Per person"}),e.jsxs("div",{className:"text-sm mt-2",style:{color:s.body},children:[b(h)," total",e.jsxs("span",{style:{color:s.muted},children:[" (",i,")"]})]}),p&&e.jsxs("div",{className:"text-xs mt-1",style:{color:s.green},children:["You save ",j(g)]})]})]})]}),e.jsxs("div",{className:"p-5 border-t",style:{borderColor:s.border,backgroundColor:s.pageBg},children:[e.jsx("div",{className:"mb-3",children:e.jsx("span",{className:"inline-block text-[10px] font-bold uppercase tracking-widest rounded-full px-2 py-1",style:{backgroundColor:s.green,color:s.greenText},children:"Split Pay"})}),e.jsxs("p",{className:"text-sm mb-4",style:{color:s.secondary},children:["You pay ",e.jsx("strong",{style:{color:s.body},children:j(m)})," to secure your date.",e.jsx("br",{}),"The other ",Math.max(0,i-1)," pay individually in the portal — no fronting cash, no chasing payments."]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx("button",{onClick:()=>o({city:n,audience:"adults",groupSize:a,packageId:r.id,packageName:r.name,source:`PACKAGES:${r.id}`}),className:"flex-1 rounded-[8px] px-4 py-3 text-sm font-bold uppercase tracking-wide transition-opacity hover:opacity-90 focus:outline-none",style:{backgroundColor:s.green,color:s.greenText},children:"BOOK NOW"}),e.jsx("button",{onClick:()=>o({city:n,audience:"adults",groupSize:a,packageId:r.id,packageName:r.name,source:`PACKAGES-check:${r.id}`}),className:"flex-1 rounded-[8px] px-4 py-3 text-sm font-bold uppercase tracking-wide border-2 transition-colors focus:outline-none",style:{borderColor:s.border,color:s.body,backgroundColor:"transparent"},children:"Check date"})]})]})]})}function O({children:r,setChildren:a}){const{lowBandMax:o,highBandMax:n}=c.kidsBands,d=Math.min(...c.kidsPackages.map(t=>t.priceLowBand));return e.jsxs("div",{children:[e.jsxs(P,{children:[e.jsx("span",{className:"inline-flex items-center justify-center rounded-full text-[10px] font-bold uppercase tracking-widest px-2.5 py-1 mr-3 align-middle",style:{backgroundColor:s.body,color:s.pageBg},children:"Flat"}),e.jsxs("span",{className:"align-middle",style:{color:s.body},children:[e.jsx("strong",{children:"Two flat prices"})," ",e.jsxs("span",{style:{color:s.secondary},children:["— one for up to ",o," children, one for up to ",n,". From ",b(d),", no per-child charges."]})]})]}),e.jsx(k,{label:`ONE FLAT PRICE — UP TO ${o}, OR UP TO ${n} CHILDREN`,stepperLabel:"children",value:r,min:c.childRange.min,max:c.childRange.max,onChange:a,singularNoun:"child",pluralNoun:"children",nudge:`One price up to ${o} children, one price up to ${n}.`}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5 mt-8",children:[...c.kidsPackages].sort((t,l)=>t.priceLowBand-l.priceLowBand).map(t=>e.jsx(F,{pkg:t,children:r},t.id))}),e.jsx(w,{pill:"SPARTACUS SPLIT PAY",heading:"Make it a joint party.",body:"Two families, one party, up to 20 children. Split it 50/50 in the portal — pay your half, they pay theirs. Nobody fronts the money, nobody chases it."}),e.jsx(B,{})]})}function F({pkg:r,children:a}){const o=u.useContext(v),n=u.useContext(C),{lowBandMax:d,highBandMax:t}=c.kidsBands,l=a<=d,x=l?r.priceLowBand:r.priceHighBand,i=l?`up to ${d}`:`up to ${t}`,p=r.badge==="popular"?{border:`2px solid ${s.green}`}:r.badge==="best-value"?{border:`1px solid ${s.green}`}:{border:`1px solid ${s.border}`};return e.jsxs("article",{className:"rounded-[12px] flex flex-col overflow-hidden",style:{backgroundColor:s.cardBg,...p},children:[e.jsxs("div",{className:"p-5 flex-1",children:[r.badge&&e.jsx("div",{className:"mb-3",children:e.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold uppercase tracking-widest rounded-full px-2.5 py-1",style:{backgroundColor:r.badge==="popular"?s.green:"transparent",color:r.badge==="popular"?s.greenText:s.green,border:r.badge==="best-value"?`1px solid ${s.green}`:"none"},children:r.badge==="popular"?"★ Most popular":r.badge==="best-value"?"⭐ Best Value":"New"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"font-display text-xl md:text-2xl italic font-black uppercase tracking-tight leading-tight",style:{color:s.body},children:r.name}),e.jsxs("p",{className:"text-sm mt-1",style:{color:s.secondary},children:[r.duration," • ",r.desc]}),e.jsxs("p",{className:"text-xs mt-2",style:{color:s.muted},children:[b(r.priceLowBand)," up to ",d," · ",b(r.priceHighBand)," up to ",t]})]}),e.jsx("div",{className:"sm:hidden -mx-5 border-t",style:{borderColor:s.border},"aria-hidden":!0}),e.jsxs("div",{className:"text-left sm:text-right shrink-0","aria-live":"polite",children:[e.jsx("div",{className:"font-display text-3xl md:text-4xl italic font-black leading-none",style:{color:s.body},children:b(x)}),e.jsxs("div",{className:"text-[10px] font-bold uppercase tracking-widest mt-1",style:{color:s.muted},children:["Total · ",i]})]})]})]}),e.jsxs("div",{className:"p-5 border-t",style:{borderColor:s.border,backgroundColor:s.pageBg},children:[e.jsx("div",{className:"mb-3",children:e.jsx("span",{className:"inline-block text-[10px] font-bold uppercase tracking-widest rounded-full px-2 py-1",style:{backgroundColor:s.green,color:s.greenText},children:"Split Pay"})}),e.jsxs("p",{className:"text-sm mb-4",style:{color:s.secondary},children:[e.jsx("strong",{style:{color:s.body},children:b(c.kidsDeposit)})," deposit secures your date.",e.jsx("br",{}),"Balance (",b(x-c.kidsDeposit),") due ",c.balanceDueDays," days before. Sharing with another family? Split the cost in the portal and pay separately."]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx("button",{onClick:()=>o({city:n,audience:"kids",groupSize:a,packageId:r.id,packageName:r.name,source:`PACKAGES:${r.id}`}),className:"flex-1 rounded-[8px] px-4 py-3 text-sm font-bold uppercase tracking-wide transition-opacity hover:opacity-90 focus:outline-none",style:{backgroundColor:s.green,color:s.greenText},children:"BOOK NOW"}),e.jsx("button",{onClick:()=>o({city:n,audience:"kids",groupSize:a,packageId:r.id,packageName:r.name,source:`PACKAGES-check:${r.id}`}),className:"flex-1 rounded-[8px] px-4 py-3 text-sm font-bold uppercase tracking-wide border-2 transition-colors focus:outline-none",style:{borderColor:s.border,color:s.body,backgroundColor:"transparent"},children:"Check date"})]})]})]})}function P({children:r}){return e.jsx("div",{className:"rounded-[12px] px-4 py-3 mb-6 text-sm md:text-base",style:{backgroundColor:s.cardBg,border:`1px solid ${s.green}`},children:r})}function k({label:r,stepperLabel:a,value:o,min:n,max:d,onChange:t,singularNoun:l,pluralNoun:x,nudge:i,nudgeActive:p=!1}){const m=()=>t(Math.max(n,o-1)),h=()=>t(Math.min(d,o+1));return e.jsxs("div",{className:"rounded-[12px] p-4 md:p-5",style:{backgroundColor:s.cardBg,border:`1px solid ${s.border}`},children:[e.jsx("p",{className:"text-[11px] md:text-xs font-bold uppercase tracking-[0.2em] mb-3",style:{color:s.green},children:r}),e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{"aria-label":`Remove one ${l}`,onClick:m,disabled:o<=n,className:"w-11 h-11 rounded-[8px] border-2 flex items-center justify-center transition-colors focus:outline-none disabled:opacity-40 shrink-0",style:{borderColor:s.border,color:s.body,backgroundColor:"transparent"},children:e.jsx(S,{className:"w-4 h-4",strokeWidth:3})}),e.jsx("div",{"aria-live":"polite",className:"min-w-[48px] text-center font-display text-2xl italic font-black",style:{color:s.body},children:o}),e.jsx("button",{"aria-label":`Add one ${l}`,onClick:h,disabled:o>=d,className:"w-11 h-11 rounded-[8px] border-2 flex items-center justify-center transition-colors focus:outline-none disabled:opacity-40 shrink-0",style:{borderColor:s.green,color:s.green,backgroundColor:"transparent"},children:e.jsx($,{className:"w-4 h-4",strokeWidth:3})})]}),e.jsx("span",{className:"text-xs md:text-sm uppercase tracking-widest font-bold",style:{color:s.muted},children:o===1?l:x})]}),i&&e.jsx("p",{className:"text-sm mt-3",style:{color:p?s.green:s.secondary,fontWeight:p?700:400},children:i})]})}function w({pill:r,heading:a,body:o}){return e.jsxs("div",{className:"rounded-[12px] p-6 md:p-8 mt-10",style:{backgroundColor:s.cardBg,border:`2px solid ${s.green}`},children:[e.jsx("span",{className:"inline-block text-[10px] font-bold uppercase tracking-widest rounded-full px-2.5 py-1 mb-4",style:{backgroundColor:s.green,color:s.greenText},children:r}),e.jsx("h3",{className:"font-display text-2xl md:text-3xl italic font-black uppercase tracking-tight leading-tight mb-3",style:{color:s.body},children:a}),e.jsx("p",{className:"text-base md:text-lg",style:{color:s.secondary},children:o})]})}function B(){const r=["Groups from 8","All-inclusive, no hidden fees","Instant confirmation"];return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 mt-6",children:r.map(a=>e.jsxs("div",{className:"rounded-[12px] px-4 py-3 text-sm text-center font-medium",style:{backgroundColor:s.cardBg,border:`1px solid ${s.border}`,color:s.body},children:[e.jsx(A,{className:"inline-block w-3.5 h-3.5 mr-2 -mt-0.5",style:{color:s.green},fill:"currentColor"}),a]},a))})}export{E as L};