import{_ as F}from"./OqHy3vAx.js";import{u as T,_ as J,a as O,b as R}from"./CWZwcrWm.js";import{_ as Z}from"./D7MfkRLW.js";import{a2 as G,a6 as H,a as K,Z as Q,E as W,a7 as X,ae as Y,bm as ee}from"./DB-BdW1A.js";import{j as te,a as B,k as ae,z as se,o as oe,L as ne,O as le,I as s,P as l,a0 as ie,a1 as ce,u as t,_ as re,U as P,R as ue,S as D}from"./DokyoHAC.js";import"./C2ORwYxZ.js";import"./CkhvV11h.js";import"./Bz4IcuNm.js";import"./C53zYwgM.js";const me={class:"flex min-h-screen flex-col font-body text-base/6 text-black antialiased anchor-scrolling-none"},de={id:"header",class:"sticky inset-x-0 top-0 z-50 flex-none overflow-hidden border-b border-gray-200 bg-white text-sm shadow-sm outline-none lg:shadow-sm xl:border-b xl:shadow-none"},fe={class:"container relative flex flex-col items-center justify-center py-3.5 md:py-4"},he={class:"-mb-4 mt-4 w-screen bg-yellow-100 p-[0.9rem] text-center text-xs/none"},$e=te({__name:"checkout",setup(_e){const c=B(null),i=B(!1),r=G(),u=H("layout"),a=ae(()=>u.data.value),{unhandled:L,handled:M}=K(),{toggle:m}=Q("VoucherSlideIn"),{enabledVaultItems:o,getVaultItems:z}=W();return X(async()=>{await Promise.all([L(()=>u.fetchBySlug("default",3)),z()])},"$mrJdsCMilw"),T(),se(async()=>{c.value=Y(()=>{var n;(n=location.hash)!=null&&n.includes("#/payment")?i.value=!0:i.value=!1},500);const e=[];r.data.value||e.push(M(()=>r.fetch())),e.length&&await Promise.all(e)}),oe(()=>{clearInterval(c.value)}),(e,n)=>{var d,f,h,_,p;const A=F,U=J,j=O,q=Z,E=R;return ne(),le("div",me,[s(A),l("header",de,[l("div",fe,[s(U,{class:"h-[21px] w-[155px] md:h-[31px] md:w-[227px]","link-to":"/?home"}),ie(l("div",he,[re(P(e.$t("basket.vouchers_available",((d=t(o))==null?void 0:d.length)||0,{quantity:((f=t(o))==null?void 0:f.length)||0}))+" ",1),l("button",{type:"button",class:"underline hover:no-underline",onClick:n[0]||(n[0]=(...v)=>t(m)&&t(m)(...v))},P(e.$t("basket.vouchers_show",(h=t(o))==null?void 0:h.length,{quantity:(_=t(o))==null?void 0:_.length})),1)],512),[[ce,((p=t(o))==null?void 0:p.length)&&i.value]])])]),ue(e.$slots,"default",{class:"min-h-screen flex-1"}),s(q,null,{default:D(()=>[s(j)]),_:1}),s(ee,{ssr:""},{lazy:D(({visible:v})=>{var y,g,b,x,w,k,S,$,C,I,N,V;return[s(E,{data:{theme:(g=(y=a.value)==null?void 0:y.fields)==null?void 0:g.theme,paymentMethods:(x=(b=a.value)==null?void 0:b.fields)==null?void 0:x.paymentMethods,legal:(k=(w=a.value)==null?void 0:w.fields)==null?void 0:k.legal,microcopy:($=(S=a.value)==null?void 0:S.fields)==null?void 0:$.microcopy,footerNavigation1:(I=(C=a.value)==null?void 0:C.fields)==null?void 0:I.footerNavigation1,footerNavigation2:(V=(N=a.value)==null?void 0:N.fields)==null?void 0:V.footerNavigation2,checkout:!0}},null,8,["data"])]}),_:1})])}}});export{$e as default};