import{_ as Ps}from"./iCAGHVvh.js";import{C as Ss,ay as Is,B as Bs,Q as Ts,d as Pe,g as Se,R as zs,az as Ls,Z as Cs,H as q,h as Ct,A as re,N as It,aA as Ds,aj as As,a4 as Vs,u as Ns,aB as Os,aw as Rs,T as js,v as Us,a6 as Hs,aC as Ms,a3 as Fs,a9 as Ws,aD as Es,a7 as we,$ as qs,c as Ks,M as Gs,aE as Qs,al as Js,b as Ys,as as Xs,aF as Zs,aG as ea,am as ta,aH as Bt,aI as sa,aJ as aa,aK as oa,ar as la,aL as Tt,aM as na,aN as ia,aO as ca,V as ra,aP as ua,aQ as da,aR as pa,aS as ma,q as _a,aT as va,aU as fa,aV as ba,aW as ha,ao as ga,ap as ka,aX as ya,a1 as xa,aY as wa,ax as $a,aZ as Pa}from"./BDl4c6dV.js";import{_ as Sa}from"./DrUHwdXW.js";import{a as te,z as Dt,b as Ia,L as t,M as P,S as h,P as s,I as u,j as Q,k as _,R as At,_ as M,U as r,N as Ba,an as Ta,J as za,u as a,O as n,W as i,H as G,Y as ee,D as $e,a6 as zt,V as K,a5 as La,a2 as Lt}from"./DGQDO-VU.js";import Vt from"./D0lEZDs6.js";import{u as Ca}from"./vscFxidx.js";import Da from"./DIk2Sl4Y.js";import Aa from"./dmkV3TNJ.js";import{_ as Va}from"./ATPrNvK9.js";import Na from"./DagZv-xT.js";import Oa from"./C8AASl2U.js";import Ra from"./BLhBOu94.js";import{u as ja}from"./BXxoQfbc.js";import{u as Ua}from"./C2MFhLIx.js";const Nt=c=>Object.keys(c).reduce((S,v)=>{const g=[v].filter(Boolean).toString();return typeof(c==null?void 0:c[v])=="object"?{...S,...Nt(c[v])}:{...S,[g]:c[v]}},{}),Ha=c=>c.map(Nt),Ma=c=>{const S=te({id:0,with:{variants:{}}}),{data:v,fetch:g}=Ss("getProductById","useStockResolver",S,{immediate:!1,getCachedData:void 0,watch:()=>{}}),k=async()=>{var z,A;if(!((z=c.value)!=null&&z.variants)||"__stockResolved"in c.value||(S.value={id:c.value.id,with:{variants:{}},ttl:0},await g(),!v.value))return;const p={};for(const d of v.value.variants||[]){const f=c.value.variants.find(x=>x.id===d.id);((A=d.stock)==null?void 0:A.quantity)!==f.stock.quantity&&(p[d.id]=d.stock)}Is(p)||(c.value={...c.value,isSoldOut:v.value.isSoldOut,variants:c.value.variants.map(d=>d.id in p?{...d,stock:p[d.id]}:d)},Object.defineProperty(c.value,"__stockResolved",{value:!0}))};Dt(k),Ia(c,k)},Fa={},Wa={class:"flex max-w-6xl justify-between"},Ea={class:"space-y-3"},qa={class:"w-12"};function Ka(c,S){const v=Ps,g=Ts,k=Sa;return t(),P(k,null,{default:h(()=>[s("div",Wa,[u(v,{class:"max-w-xl"}),s("div",Ea,[u(g,{type:"headline","full-width":""}),s("div",qa,[u(g,{type:"headline"})]),u(g,{type:"headline","full-width":""}),u(g,{type:"headline","full-width":""}),u(g,{class:"mt-20",type:"button"})])])]),_:1})}const Ga=Bs(Fa,[["render",Ka]]),Qa=Q({__name:"GoBackLink",props:{to:{type:String,default:"./"},useWindowHistory:{type:Boolean,default:!1}},setup(c){const S=c,v=_(()=>S.useWindowHistory?{click:g}:{}),g=()=>{window==null||window.history.back()};return(k,p)=>{const z=Vt;return t(),P(za(c.useWindowHistory?"button":Pe),Ba(c.useWindowHistory?{}:{to:c.to},{"data-test-id":"back-button",class:"absolute left-6 top-4 z-30 mt-0 inline-flex items-center gap-2 underline md:static"},Ta(v.value)),{default:h(()=>[u(z,{class:"h-[13px] w-[15px]"}),s("span",null,[At(k.$slots,"default",{},()=>[M(r(k.$t("global.back")),1)])])]),_:3},16)}}}),Ja={key:1},Ya=Q({__name:"ProductDetailBreadcrumbs",props:{links:{type:Array,required:!0},backUrl:{type:String,default:""}},setup(c){const{$i18n:S}=Se(),v=c,{flush:g}=Ca(),k=g(),p=_(()=>v.links.slice().pop()),z=_(()=>p.value?p.value.value:S.t("global.back"));return(A,d)=>{const f=Qa,x=Vt;return a(k)?(t(),P(f,{key:0,to:c.backUrl,"use-window-history":!0},{default:h(()=>[M(r(z.value),1)]),_:1},8,["to"])):p.value?(t(),n("div",Ja,[u(Pe,{"data-test-id":"back-button",class:"absolute left-6 top-6 z-30 inline-flex items-center gap-2 underline md:static",to:p.value.to},{default:h(()=>[u(x,{class:"h-2.5 w-2.5"}),s("span",null,r(p.value.value),1)]),_:1},8,["to"])])):i("",!0)}}}),Xa=["innerHTML"],Za={class:"block divide-y divide-gray-300"},eo={class:"block text-left"},to=["innerHTML"],so={key:0,class:"block py-2"},ao={class:"block text-left"},oo={class:"block text-left"},lo={key:1,class:"block py-2"},no={class:"block text-left"},io={class:"block text-left"},co={key:2,class:"block py-2"},ro={class:"block text-left"},uo={class:"block text-left"},po={key:3,class:"block py-2"},mo={class:"block text-left"},_o={class:"block text-left"},vo={key:4,class:"block py-2"},fo={class:"block text-left"},bo={class:"block text-left"},ho={key:5,class:"block py-2"},go={class:"block text-left"},ko={class:"block text-left"},yo={key:6,class:"block py-2"},xo={class:"block text-left"},wo={class:"block text-left"},$o={key:7,class:"block py-2"},Po={class:"block text-left"},So={class:"block text-left"},Io={key:8,class:"block py-2"},Bo={class:"block text-left"},To={class:"block text-left"},zo={key:9,class:"block py-2"},Lo={class:"block text-left"},Co={class:"block text-left"},Do=Q({__name:"ProductDescription",props:{productDescriptionInfo:{type:String,default:""},productInfos:{type:Array,default:()=>[]},fitInfos:{type:Object,default:()=>({})}},setup(c){const S=c,v=_(()=>S.productInfos.filter(p=>!!p).map(p=>({key:p.label,value:p.value}))),g=_(()=>v.value.filter(({key:p})=>p!=="Artikelnummer")),k=_(()=>v.value.find(({key:p})=>p==="Artikelnummer"));return(p,z)=>(t(),n("div",null,[c.productDescriptionInfo?(t(),n("div",{key:0,class:"mb-4",innerHTML:c.productDescriptionInfo},null,8,Xa)):i("",!0),s("table",Za,[(t(!0),n(G,null,ee(g.value,(A,d)=>(t(),n("tr",{key:d,class:"block py-2"},[s("th",eo,r(A.key),1),s("td",{class:"block text-left",innerHTML:A.value},null,8,to)]))),128)),c.fitInfos.fitting?(t(),n("tr",so,[s("th",ao,r(p.$t("pdp.fitting"))+":",1),s("td",oo,r(c.fitInfos.fitting),1)])):i("",!0),c.fitInfos.neckline?(t(),n("tr",lo,[s("th",no,r(p.$t("pdp.neckline"))+":",1),s("td",io,r(c.fitInfos.neckline),1)])):i("",!0),c.fitInfos.upperLength?(t(),n("tr",co,[s("th",ro,r(p.$t("pdp.upperLength"))+":",1),s("td",uo,r(c.fitInfos.upperLength),1)])):i("",!0),c.fitInfos.sleeveLength?(t(),n("tr",po,[s("th",mo,r(p.$t("pdp.sleeveLength"))+":",1),s("td",_o,r(c.fitInfos.sleeveLength),1)])):i("",!0),c.fitInfos.shirtCut?(t(),n("tr",vo,[s("th",fo,r(p.$t("pdp.shirtCut"))+":",1),s("td",bo,r(c.fitInfos.shirtCut),1)])):i("",!0),c.fitInfos.shortsLength?(t(),n("tr",ho,[s("th",go,r(p.$t("pdp.shortsLength"))+":",1),s("td",ko,r(c.fitInfos.shortsLength),1)])):i("",!0),c.fitInfos.trousersLength?(t(),n("tr",yo,[s("th",xo,r(p.$t("pdp.trousersLength"))+":",1),s("td",wo,r(c.fitInfos.trousersLength),1)])):i("",!0),c.fitInfos.skirtLength?(t(),n("tr",$o,[s("th",Po,r(p.$t("pdp.skirtLength"))+":",1),s("td",So,r(c.fitInfos.skirtLength),1)])):i("",!0),c.fitInfos.trousersCut?(t(),n("tr",Io,[s("th",Bo,r(p.$t("pdp.trousersCut"))+":",1),s("td",To,r(c.fitInfos.trousersCut),1)])):i("",!0),k.value?(t(),n("tr",zo,[s("th",Lo,r(k.value.key)+":",1),s("td",Co,r(k.value.value),1)])):i("",!0)])]))}}),Ao={key:0,class:"border-b border-gray-300 bg-gray-100 px-4 py-6 leading-snug"},Vo=Q({__name:"ProductDetailAccordionEntry",props:{title:{type:String,required:!0},collapsed:{type:Boolean,default:!0}},setup(c){const v=te(c.collapsed);return(g,k)=>{const p=zs,z=Ls,A=Cs;return t(),n("div",null,[s("button",{class:"flex w-full items-center justify-between border-b border-gray-300 py-3 text-xl",onClick:k[0]||(k[0]=d=>v.value=!v.value)},[s("span",null,r(c.title),1),v.value?(t(),P(p,{key:0,class:"h-3 w-3.5"})):(t(),P(z,{key:1,class:"h-3.5 w-3"}))]),u(A,null,{default:h(()=>[v.value?i("",!0):(t(),n("div",Ao,[At(g.$slots,"default")]))]),_:3})])}}}),No={__name:"ProductShippingAndReturn",props:{content:{type:Object,required:!0}},setup(c){return(S,v)=>{const g=$e("CfRichtext");return t(),P(g,{document:c.content,class:"prose prose-a:font-normal prose-a:text-blue-500 prose-a:underline hover:prose-a:no-underline max-w-none leading-normal"},null,8,["document"])}}},Oo=Q({__name:"ProductDetails",props:{product:{type:Object,default:()=>null},content:{type:Object,default:()=>null}},setup(c){const S=[1053,1065,1054,1062],v=c,g=_(()=>{var d;return Object.values((d=v.product)==null?void 0:d.attributes).filter(({type:f})=>f.includes("productdetails")).map(({id:f,label:x,type:I,values:B})=>{var T;return{id:f,label:x,position:((T=I.split("_"))==null?void 0:T[1])||"100",value:Array.isArray(B)?B.map(V=>V.label).join(", "):B.label||""}}).filter(f=>f.value!=="")}),k=_(()=>{var d;return Object.values((d=v.product)==null?void 0:d.advancedAttributes).filter(({type:f})=>f.includes("productdetails")).map(({id:f,label:x,type:I,values:B})=>{var T;return{id:f,label:x,position:((T=I.split("_"))==null?void 0:T[1])||"100",value:B.map(V=>V.fieldSet[0].map(w=>Object.values(w)[0]).join(" ")).join(" / ")}})}),p=_(()=>{var I;const d=[...g.value,...k.value,{id:1,label:"Artikelnummer",value:((I=v.product)==null?void 0:I.referenceKey)||"",position:"101"}],f=[];for(const B in S)for(const T in d)d[T].id===S[B]&&(f.push(d[T].value),delete d[T]);let x="";return f[0]!==void 0&&(x=f[0]),f[1]!==void 0&&(x+=" / "+f[1]),f[2]!==void 0&&(x+=" / "+f[2]),f[3]!==void 0&&(x+=" - "+f[3]),x&&d.push({id:2,label:"Artikeldetails leverancier",value:x,position:"202"}),d.sort((B,T)=>B.position<T.position?-1:1),d}),z=_(()=>{const d=["fitting","upperLength","sleeveLength","shirtCut","shortsLength","trousersLength","trousersCut","skirtLength","neckline"],f={};return d.forEach(x=>{var B,T,V,w;const I=(T=q((B=v.product)==null?void 0:B.attributes,x))==null?void 0:T.label;I&&I!==""&&(f[x]=(w=q((V=v.product)==null?void 0:V.attributes,x))==null?void 0:w.label)}),f}),A=_(()=>{var d,f,x,I,B,T;if((x=(f=(d=v.product)==null?void 0:d.advancedAttributes)==null?void 0:f.productDescription)!=null&&x.values[0].fieldSet)return Ha((T=(B=(I=v.product)==null?void 0:I.advancedAttributes)==null?void 0:B.productDescription)==null?void 0:T.values[0].fieldSet)[0].value});return(d,f)=>{const x=Do,I=Vo,B=No;return t(),n("div",null,[u(I,{title:d.$t("pdp.product_info_heading")},{default:h(()=>[u(x,{"product-description-info":A.value,"product-infos":p.value,"fit-infos":z.value},null,8,["product-description-info","product-infos","fit-infos"])]),_:1},8,["title"]),u(I,{title:d.$t("pdp.shipping_return_heading")},{default:h(()=>[u(B,{content:v.content.fields.shippingReturnContent},null,8,["content"])]),_:1},8,["title"]),u(I,{title:d.$t("pdp.payment_heading")},{default:h(()=>[u(B,{content:v.content.fields.paymentContent},null,8,["content"])]),_:1},8,["title"])])}}}),Ro=()=>{const{$i18n:c,$helpers:S,localePath:v}=Se(),g=Ct();return{showAddToBasketToast:(p,z)=>{var I;const A=((I=q(z==null?void 0:z.attributes,"name"))==null?void 0:I.label)||c.t("wishlist.product"),d=c.t("basket.notification.add_to_basket_success",{productName:A}),f=p?re.route:re.confirm,x=_(()=>p?It.success:It.error);g.show(d,f,{...p&&{to:Ds.basket}},x.value)}}},jo={key:1,"data-test-id":"product-detail-page"},Uo=s("div",null,null,-1),Ho=["innerHTML"],Mo={key:0},Fo={key:1},Wo={class:"container relative md:max-w-none md:px-0"},Eo={class:"contents md:container md:block"},qo={class:"md:my-5 lg:my-10"},Ko={class:"contents gap-x-2.5 lg:mb-14 lg:flex lg:items-start"},Go={class:"contents md:block md:pl-[184px] lg:top-36 lg:w-5/12 lg:pl-0 lg:pr-[100px]"},Qo={class:"mb-16 lg:mb-0"},Jo={class:"relative"},Yo={class:"absolute bottom-0 z-10 -ml-6 hidden flex-wrap gap-1 text-sm md:bottom-20 lg:static lg:mb-5 lg:ml-0 [&:has(.inline-block)]:flex"},Xo={class:"mb-2 md:mb-5"},Zo={class:"text-base leading-relaxed md:text-xl md:leading-none","data-test-id":"pdp-product-name"},el={class:"mb-2 font-bold"},tl={class:"mb-2 font-bold"},sl={key:3,class:"sticky bottom-0 top-[88px] z-20 -mx-6 bg-white px-6 py-3 text-2xl font-bold lg:static lg:mx-0 lg:px-0"},al={key:4,class:"sticky bottom-0 top-[88px] z-20 -mx-6 bg-white px-6 py-3 lg:static lg:mx-0 lg:px-0"},ol={class:"btn btn-cta"},ll={key:0,class:"relative mb-0 w-full bg-yellow-100 px-10 py-1 text-center lg:inline-block lg:w-auto lg:pr-2.5"},nl=["innerHTML"],il={class:"sticky bottom-0 top-[88px] z-20 -mx-6 bg-white px-6 py-4 lg:static lg:mx-0 lg:px-0"},cl={key:0},rl={key:1},ul={key:7,class:"md:max-w-xs"},dl=s("div",null,[s("div",{class:"font-bold"},"Shop bijpassend artikel"),s("span",{class:"underline group-hover:no-underline"},"Bekijk artikel")],-1),pl={class:"relative flex w-full items-center justify-between"},ml={key:0},_l={key:1},vl={key:2},fl={key:3},bl={key:0,class:"flex items-center"},hl=s("span",null,"Niet meer volgen",-1),gl={key:1,class:"flex items-center"},kl=s("span",null,"Favoriet",-1),yl={key:2,class:"flex items-center"},xl={key:0},wl={key:1},$l={class:"relative flex w-full items-center justify-between"},Pl={key:0},Sl={key:1},Il={key:2},Bl={key:3},Tl={key:0,class:"flex items-center"},zl=s("span",null,"Niet meer volgen",-1),Ll={key:1,class:"flex items-center"},Cl=s("span",null,"Favoriet",-1),Dl={key:2,class:"flex items-center"},Al={key:0},Vl={key:1},Nl={class:"w-full"},Ol={key:0,class:"-mx-6 mb-10 overflow-hidden bg-yellow-200 px-6 md:mx-0 md:px-0"},Rl={class:"pt-12 md:container"},jl={class:"md:container"},Ul={class:"mb-20"},Hl=s("div",{class:"mb-2 font-heading text-2xl md:mb-6"},"Bekijk meer",-1),Ml={class:"block text-xs md:flex md:flex-wrap md:gap-2"},Fl={class:"-mx-8 mb-14 hidden bg-yellow-200 px-8 py-10 md:mx-0 md:block md:px-0"},Wl={class:"flex flex-col items-start justify-between gap-8 md:container md:flex-row"},El={class:"flex flex-auto flex-col gap-7 lg:basis-1/3 lg:flex-row"},ql={class:"lg:pr-10 lg:pt-4"},Kl={key:0,class:"mb-2 font-bold"},Gl={key:1},Ql={class:"flex flex-auto flex-col gap-7 lg:basis-1/3 lg:flex-row"},Jl={class:"lg:pr-10 lg:pt-4"},Yl={key:0,class:"mb-2 font-bold"},Xl={key:1},Zl={class:"flex flex-auto flex-col gap-7 lg:basis-1/3 lg:flex-row"},en={class:"lg:pr-10 lg:pt-4"},tn={key:0,class:"mb-2 font-bold"},sn={key:1},an={class:"md:container"},on={class:"mb-20 hidden md:grid md:grid-cols-12"},ln={class:"relative flex md:col-span-8 md:col-start-3 md:mx-auto md:gap-20"},nn=["src","alt"],cn=s("div",{class:"mb-5 flex items-center pl-24 text-5xl md:pl-0"},[s("div",null,[s("span",{class:"block md:inline"},"Service van"),M(" Van Tilburg ")])],-1),rn={key:0,class:"mb-5"},un={key:0,class:"mb-14 flex flex-col bg-gray-100 md:flex-row-reverse",style:{"grid-template-rows":"1fr min-content 1fr"}},dn={class:"aspect-[1/1] flex-none md:w-1/2"},pn=["src","alt"],mn={class:"flex flex-none flex-col items-center px-6 py-8 text-center text-yellow-900 md:w-1/2 md:justify-between md:px-32 md:py-16"},_n={class:"hidden text-xs uppercase tracking-widest md:block"},vn={class:"pb-7 text-5xl md:pb-0 md:text-[88px]"},fn={class:"mb-6 md:col-start-2 md:my-8 md:mb-0 md:px-14"},bn={class:""},hn=s("span",null,"Bekijk meer",-1),gn={key:1},kn={class:"flex flex-wrap border-b border-gray-300 pb-4 md:pb-1.5"},yn=s("span",{class:"mx-2 text-gray-300"},"/",-1),jn=Q({name:"ProductDetailPage",__name:"[slug]",async setup(c){var Ue;let S,v;const{getProductDetailRoute:g}=As(),{$i18n:k,$config:p}=Se(),z=Ct(),{setPageState:A}=Vs(),{params:d,redirectedFrom:f,path:x,fullPath:I}=Ns(),B=Os(),T=Ro(),V=_(()=>{var e,o;return((o=(e=d.slug)==null?void 0:e.split("-"))==null?void 0:o.pop())||""}),w=te(!1),Ie=te({id:0,with:{}}),{data:l,fetch:Ot,fetching:Be}=ja({params:Ie,options:{immediate:!1,watch:()=>{}},key:`product-${V.value}`}),{fetchBrandById:Rt,brandById:R}=Rs(d.slug),{favoriteBrands:ue,getFavoriteBrands:jt,toggleFavorite:Ut}=js(),L=_(()=>{var e,o;return!!((o=(e=ue.value)==null?void 0:e.data)!=null&&o.find(m=>{var b;return m.id===`${(b=R.value)==null?void 0:b.id}`}))}),de=_(()=>{var m,b,C,N,W,j,E,ne,ie,ce;const e=((b=(m=l.value)==null?void 0:m.images)==null?void 0:b.map(({hash:ye})=>({src:ye,alt:""})))||[],o=((ce=(ie=(ne=(E=(j=(W=(N=(C=l.value)==null?void 0:C.advancedAttributes)==null?void 0:N.videoUrl)==null?void 0:W.values)==null?void 0:j[0])==null?void 0:E.fieldSet)==null?void 0:ne[0])==null?void 0:ie[0])==null?void 0:ce.value)||null;return o&&e.push({src:o,alt:""}),e}),Te=_(()=>{var e,o,m,b;return((b=(m=(o=(e=l.value)==null?void 0:e.attributes)==null?void 0:o.contentfulTag)==null?void 0:m.values)==null?void 0:b.map(C=>C.value))||[]}),se=_(()=>{var e,o,m,b;return!!((b=(m=(o=(e=l.value)==null?void 0:e.variants)==null?void 0:o[0])==null?void 0:m.attributes)!=null&&b.originalSizeCadeaukaar)}),ze=_(()=>{var e,o;return((o=q((e=l.value)==null?void 0:e.attributes,"brand"))==null?void 0:o.id)||0});Ma(l);const{trackAddToBasket:Ht,trackViewItemList:xn,trackViewItem:Mt}=Us(),pe=Hs(),me=Ms(),{addItem:Ft,fetching:Le,data:wn}=Fs();Ua();const{getDeliveryPromiseByVariant:_e,getLocationsByVariants:Wt,hasWarehouseStock:Et}=Ws(),qt=_(()=>{var e,o;return!((e=l.value)!=null&&e.isSoldOut)&&!Et(((o=l.value)==null?void 0:o.variants)||[])}),ve=_(()=>{var e,o;return((o=(e=l.value)==null?void 0:e.variants)==null?void 0:o.filter(m=>sa(m).available))||[]}),J=_(()=>{var e,o;return typeof D.value<"u"?`deliveryPromise.${_e(D.value)}`:ve.value.length===1?`deliveryPromise.${_e(ve.value[0])}`:(o=(e=l.value)==null?void 0:e.variants)!=null&&o.length&&Wt(l.value.variants).length===1?`deliveryPromise.${_e(l.value.variants[0])}`:null}),fe=_(()=>{var e,o,m,b,C,N,W,j;return(`${(j=(W=(N=(C=(b=(m=(o=(e=l==null?void 0:l.value)==null?void 0:e.advancedAttributes)==null?void 0:o.relatedProduct)==null?void 0:m.values)==null?void 0:b[0])==null?void 0:C.fieldSet)==null?void 0:N[0])==null?void 0:W[0])==null?void 0:j.value}`.split(/[,;]+/)||[]).map(E=>parseInt(E.trim(),10)).filter(E=>E>0)}),Kt=_(()=>({ids:fe.value,with:{attributes:{withKey:["color","brand","name"]},variants:{attributes:"all",lowestPriorPrice:!0},images:{attributes:{withKey:["imageType","imageView","imageBackground","imageKind"]}},priceRange:!0,lowestPriorPrice:!0}})),{data:Gt,fetch:Qt}=Es({params:Kt,options:{immediate:!1},key:`fetch-related-products-for-id-${d.slug}`}),Jt=async()=>{try{fe.value.length&&await Qt()}catch(e){console.error("Error fetching products by ids",e)}},Yt=_(()=>(f==null?void 0:f.fullPath)||null),{list:be,fetchByQuery:Xt}=we(`page|related-look-${d.slug}`),{data:$,fetchBySlug:Zt}=we("pdpLayout"),{data:F,fetchByQuery:es}=we(`page|related-blog-${d.slug}`),he=new Date,{isOpen:ge}=qs("SizeSelectorSlideIn"),Ce=_(()=>{var e;return(e=R.value)==null?void 0:e.slug}),ae=_(()=>{var e,o;return((o=q((e=l.value)==null?void 0:e.attributes,"offlineProduct"))==null?void 0:o.value)==="true"}),De=_(()=>{var e,o;return(o=(e=l.value)==null?void 0:e.categories)==null?void 0:o.reduce((m,b)=>(b.length>2&&m.push(b.slice(-1)[0]),m),[])});if(_(()=>{var e;return!D.value&&((e=X.value)==null?void 0:e.appliedReductions.length)}),Ie.value={id:parseInt(V.value,10),with:{attributes:"all",advancedAttributes:"all",variants:{attributes:"all",lowestPriorPrice:!0},images:{attributes:{withKey:["imageType","imageView","imageBackground"]}},categories:"all",siblings:{images:{attributes:{withKey:["imageType","imageView","imageBackground"]}},attributes:{withKey:["color","name","brand"]}},priceRange:!0,lowestPriorPrice:!0}},[S,v]=zt(()=>Ot()),await S,v(),!l.value)throw Ks({statusCode:404,statusMessage:"Page Not Found"});[S,v]=zt(()=>Promise.all([Xt({"fields.products":V.value,limit:3}),Zt("default",3),Rt({id:ze.value}),fe.value.length?Jt():void 0,Te.value.length?es({"fields.productRelationExpires[gte]":he.getUTCFullYear()+"-"+("0"+(he.getUTCMonth()+1)).slice(-2)+"-"+("0"+he.getUTCDate()).slice(-2),"fields.tag[match]":Te.value.join(","),limit:1},1):void 0].filter(e=>e))),await S,v(),Dt(()=>{A("typeId",V.value),setTimeout(()=>{l.value&&Mt({product:l.value})},1e3),jt()});const Ae=_(()=>{var e;return((e=Gt.value)==null?void 0:e.filter(o=>!o.isSoldOut&&o.isActive))||[]}),D=te(),{sizeAttributeName:ts,hasOneSizeVariantOnly:Y}=Gs(l),Ve=_(()=>{var e;return aa(((e=l.value)==null?void 0:e.variants)||[])}),X=_(()=>{var e;return D.value?oa(D.value):(e=Ve.value)==null?void 0:e.price}),ss=_(()=>{var e,o,m;return((e=D.value)==null?void 0:e.lowestPriorPrice)||((o=Ve.value)==null?void 0:o.lowestPriorPrice)||((m=l.value)==null?void 0:m.lowestPriorPrice)}),ke=_(()=>{var e,o;return((o=q((e=l.value)==null?void 0:e.attributes,"name"))==null?void 0:o.label)||k.t("wishlist.product")}),O=_(()=>{var e;return(e=R.value)==null?void 0:e.name}),Z=_(()=>{var e;return`${O.value} ${ke.value} ${(e=l.value)==null?void 0:e.id}`}),Ne=_(()=>{const e=k.t("pdp.seo.description_long",{productName:Z.value}),o=k.t("pdp.seo.description_short",{productName:Z.value});return Z.value.length>51?o:e}),as=e=>{var o,m;return((m=(o=l.value)==null?void 0:o.siblings)==null?void 0:m.find(b=>b.id===e))||l.value},{isFullscreen:os}=Qs(),ls=_(()=>{var e,o;return l.value?la({description:Ne.value,robots:"index,follow",canonical:`${p.public.baseUrl}${B(g(l==null?void 0:l.value))}`,socialCards:{ogUrl:`${p.public.baseUrl}${B(g(l==null?void 0:l.value))}`,ogTitle:Z.value,ogDescription:Ne.value,ogType:"product",ogImage:p.public.imageBaseUrl+((o=(e=de.value)==null?void 0:e[0])==null?void 0:o.src)||""}}):{}}),ns=e=>{const o=k.t("global.title_template",{title:e});return e.length>46?e:o},Oe=async()=>{var o,m,b,C;if(Y.value&&((o=l.value)!=null&&o.variants)&&(D.value=(m=l.value)==null?void 0:m.variants[0]),D.value===void 0){if(!ge.value){ge.value=!0;return}z.show(k.t("basket.notification.select_size"),re.confirm,void 0,Tt.warn);return}const e=((C=q((b=l.value)==null?void 0:b.attributes,"name"))==null?void 0:C.label)||k.t("wishlist.product");try{await Ft({variantId:D.value.id,quantity:1,customData:{payment:{standard_invoice:!1}}}),ge.value=!1,T.showAddToBasketToast(!0,l.value),l.value&&Ht({product:l.value,variant:D.value,index:1})}catch(N){console.error(N),z.show(k.t("basket.notification.add_to_basket_error",{productName:e}),re.confirm,void 0,Tt.error)}},is=async()=>{var o,m;if(!((o=l.value)!=null&&o.id))return;const e=!oe.value;me.trackWishlistEvent(e?"added":"removed",{product:l.value,variant:D.value}),await pe.toggleItem(me.getWishlistParams(l.value.id,e?(m=D.value)==null?void 0:m.id:void 0)),me.showWishlistToast(e,l.value)},Re=e=>{var o;(o=l.value)!=null&&o.variants&&(D.value=na(l.value.variants,e,ts.value))},cs=_(()=>ia(l.value,"color")),je=_(()=>{var o;const e=[...((o=l.value)==null?void 0:o.categories)||[]];return e.sort((m,b)=>b.length-m.length),e.length?e[0].map(m=>({value:m.categoryName,to:m.categoryUrl})):[]}),oe=_(()=>V.value!==void 0?!!pe.findItem({productId:parseInt(V.value)}):!1),{isCountdown:rs,countdown:$n,countdownTime:le,countdownText:us}=Js(l);Ys({title:Z.value,titleTemplate:ns,...ls.value});const ds=Xs(`${p.public.baseUrl}${I}`),ps=(Ue=X.value)==null?void 0:Ue.withTax,ms={sizes:"sm:100vw md:100vw",modifiers:{quality:"75"},provider:"default"},_s=l.value.images.map(e=>Zs(e.hash,ms).url);return(!Be||l)&&ea(()=>{var e,o,m,b,C,N;return ca({price:`${(ps/100).toFixed(2)}`,productName:ke.value,brandName:(b=(m=(o=(e=l.value)==null?void 0:e.attributes)==null?void 0:o.brand)==null?void 0:m.values)==null?void 0:b.label,isInStock:(N=(C=l.value)==null?void 0:C.variants)==null?void 0:N.some(ra),url:ds,images:_s})}),(e,o)=>{var qe,Ke,Ge,Qe,Je,Ye,Xe,Ze,et,tt,st,at,ot,lt,nt,it,ct,rt,ut,dt,pt,mt,_t,vt,ft,bt,ht,gt,kt,yt,xt,wt,$t,Pt,St;const m=Ga,b=ua,C=da,N=pa,W=ma,j=_a,E=va,ne=Ya,ie=fa,ce=ba,ye=ha,vs=ga,He=ka,U=Pe,fs=ya,Me=xa,bs=wa,hs=$e("CfUspSet"),gs=Oo,Fe=Da,We=Aa,Ee=$a,ks=$e("CfLookExtended"),xe=Va,ys=Na,xs=Oa,ws=Ra,$s=Pa;return a(Be)?(t(),P(m,{key:0})):a(l)?(t(),n("section",jo,[u(E,null,{sizepicker:h(()=>[!a(Y)&&!ae.value&&!a(le)?(t(),P(C,{key:0,class:"my-6",product:a(l),onSelectSize:Re},{title:h(()=>[Uo]),productSizeTable:h(()=>[a(R)?(t(),P(b,{key:0,product:a(l),brand:a(R)},null,8,["product","brand"])):i("",!0)]),_:1},8,["product"])):i("",!0)]),deliverypromise:h(()=>[J.value?(t(),n("div",{key:0,class:K(["relative mb-0 block px-10 py-1 text-center",{"bg-yellow-100":J.value!=="deliveryPromise.1_1"}])},[u(N,{class:"absolute inset-y-1 left-2 my-auto size-6"}),s("span",{innerHTML:e.$t(J.value)},null,8,Ho)],2)):i("",!0)]),cta:h(()=>[u(j,{"data-test-id":"add-item-to-basket-button","is-full-width":"",type:"primary",disabled:a(l).isSoldOut,title:a(l).isSoldOut?e.$t("badge_labels.sold_out"):"",loading:a(Le),class:"btn btn-cta w-full md:max-w-[272px]","border-sm":"",onClick:Oe},{default:h(()=>{var y;return[u(W,{class:"h-[17px] w-[14px]"}),!a(Y)&&((y=a(l).variants)!=null&&y.length)&&!D.value?(t(),n("span",Mo,r(e.$t(se.value?"pdp.select_value":"pdp.add_label")),1)):(t(),n("span",Fo,r(e.$t("pdp.add_label")),1))]}),_:1},8,["disabled","title","loading"])]),_:1}),s("div",Wo,[s("div",Eo,[s("div",qo,[u(ne,{links:je.value,"back-url":Yt.value},null,8,["links","back-url"])]),s("div",Ko,[de.value.length?(t(),P(ye,{key:0,media:de.value,variant:"pdp",class:K(["-mx-6 -mb-14 lg:top-36 lg:mx-0 lg:mb-0 lg:w-7/12 lg:pr-[90px]",a(os)?"":"sticky"])},{default:h(()=>[a(pe).pending.value?i("",!0):(t(),P(j,{key:0,class:K(["absolute right-6 top-4 z-30 flex size-10 items-center justify-center !rounded-full bg-white md:right-4",{"text-red-500":oe.value}]),type:"ghost","data-test-id":oe.value?"remove-item-from-wishlist-button":"add-item-to-wishlist-button",rounded:"",onClick:is},{icon:h(()=>[oe.value?(t(),P(ie,{key:0,class:"h-4 w-5"})):(t(),P(ce,{key:1,class:"h-4 w-5"}))]),_:1},8,["class","data-test-id"]))]),_:1},8,["media","class"])):i("",!0),s("div",Go,[s("div",Qo,[s("div",Jo,[s("div",Yo,[u(vs,{product:a(l),brand:a(R)},null,8,["product","brand"]),a(l).isSoldOut&&!a(le)?(t(),P(He,{key:0,class:"ml-0","badge-label":a(ta)({isSoldOut:a(l).isSoldOut})},null,8,["badge-label"])):i("",!0),qt.value?(t(),P(He,{key:1,class:"border border-black bg-white text-2xs text-black","badge-label":"online_only"})):i("",!0)])])]),s("h1",Xo,[u(U,{class:"mb-1 font-heading text-4xl/none md:mb-2 no-underline",to:{name:"merken-slug",params:{slug:Ce.value}},"data-test-id":"pdp-product-brand"},{default:h(()=>[M(r(O.value),1)]),_:1},8,["to"]),s("div",Zo,r(ke.value),1)]),X.value?(t(),P(fs,{key:0,size:"lg",class:"mb-6",type:"normal",price:X.value,"lowest-prior-price":ss.value,"applied-reductions":(qe=X.value)==null?void 0:qe.appliedReductions,"show-tax-info":!1},null,8,["price","lowest-prior-price","applied-reductions"])):i("",!0),se.value?i("",!0):(t(),P(bs,{key:1,limit:5,items:cs.value,"with-values":""},{item:h(({item:y,isActive:H})=>[u(U,{to:a(g)(as(y.id)),class:K(["block aspect-[72/87] w-14 border p-0.5 md:w-1/6",y.id===a(l).id?"border-black":"border-transparent hover:border-black"])},{default:h(()=>[u(Me,{image:y.image,sizes:"sm:100vw",fit:"contain",class:"size-full",height:"87",width:"72"},null,8,["image"])]),_:2},1032,["to","class"])]),_:1},8,["items"])),a(Y)?i("",!0):(t(),P(C,{key:2,class:"my-6",disabled:!!a(le)||ae.value,product:a(l),onSelectSize:Re},La({productSizeTable:h(()=>[a(R)?(t(),P(b,{key:0,product:a(l),brand:a(R)},null,8,["product","brand"])):i("",!0)]),_:2},[se.value?{name:"title",fn:h(()=>[s("div",el,r(e.$t("pdp.select_value")),1)]),key:"0"}:void 0,ae.value?{name:"title",fn:h(()=>[s("div",tl,r(e.$t("pdp.available_sizes")),1)]),key:"1"}:void 0]),1032,["disabled","product"])),ae.value?(t(),n("div",sl,[s("p",null,r(e.$t("pdp.offline_product")),1)])):a(rs)&&a(le)>0?(t(),n("div",al,[s("span",ol,r(a(us)),1)])):(t(),n(G,{key:5},[J.value&&ve.value.length?(t(),n("div",ll,[u(N,{class:"absolute inset-y-1 left-2 my-auto size-6"}),s("span",{innerHTML:e.$t(J.value)},null,8,nl)])):i("",!0),s("div",il,[u(j,{"data-test-id":"add-item-to-basket-button","is-full-width":"",type:"primary",disabled:a(l).isSoldOut,title:a(l).isSoldOut?e.$t("badge_labels.sold_out"):"",loading:a(Le),class:"btn btn-cta w-full lg:max-w-[272px]","border-sm":"",onClick:Oe},{default:h(()=>{var y;return[u(W,{class:"h-[17px] w-[14px]"}),!a(Y)&&((y=a(l).variants)!=null&&y.length)&&!D.value?(t(),n("span",cl,r(e.$t(se.value?"pdp.select_value":"pdp.add_label")),1)):(t(),n("span",rl,r(e.$t("pdp.add_label")),1))]}),_:1},8,["disabled","title","loading"])])],64)),(Ge=(Ke=a($))==null?void 0:Ke.fields)!=null&&Ge.usps?(t(),P(hs,{key:6,data:a($).fields.usps,"show-icon":!0,class:"mb-6"},null,8,["data"])):i("",!0),(Qe=Ae.value)!=null&&Qe.length?(t(),n("div",ul,[(t(!0),n(G,null,ee(Ae.value,y=>(t(),P(U,{key:`relatedProduct-${y.id}`,to:a(g)(y),class:"group mb-6 flex items-center gap-6 bg-gray-100 p-2 no-underline"},{default:h(()=>[a(Bt)(y.images)?(t(),P(Me,{key:0,fit:"contain",image:a(Bt)(y.images),alt:"",class:"w-[86px] flex-none",sizes:"sm:100vw","should-trim":!1},null,8,["image"])):i("",!0),dl]),_:2},1032,["to"]))),128))])):i("",!0),a($)?(t(),P(gs,{key:8,class:"mb-8",product:a(l),content:a($)},null,8,["product","content"])):i("",!0),(Je=a(ue))!=null&&Je.data?i("",!0):(t(),n("button",{key:9,class:"-mt-8 mb-8 flex w-full items-center justify-between border-b border-gray-300 py-3 text-xl",onClick:o[0]||(o[0]=Lt(y=>e.$router.push("/account"),["prevent"]))},[s("span",pl,[!L.value&&!w.value?(t(),n("span",ml,"Volg "+r(O.value),1)):i("",!0),!L.value&&w.value?(t(),n("span",_l,"Volg "+r(O.value),1)):i("",!0),L.value&&!w.value?(t(),n("span",vl,"Favoriet")):i("",!0),L.value&&w.value?(t(),n("span",fl,"Niet meer volgen")):i("",!0),s("span",{class:K(["btn btn-ghost btn-xxs absolute right-0 !bg-white hover:!bg-white",{"!border-black":L.value,"!border-gray-200":!L.value||w.value}])},[L.value&&w.value?(t(),n("span",bl,[u(Fe,{class:"mr-1.5 size-3 stroke-black"}),hl])):i("",!0),L.value&&!w.value?(t(),n("span",gl,[u(We,{class:"mr-1.5 size-3 fill-none stroke-black"}),kl])):i("",!0),L.value?i("",!0):(t(),n("span",yl,[u(Ee,{class:"mr-1.5 size-3 stroke-black"}),w.value?i("",!0):(t(),n("span",xl,"Volg")),w.value?(t(),n("span",wl,"Volg "+r(O.value),1)):i("",!0)]))],2)])])),(Ye=a(ue))!=null&&Ye.data?(t(),n("button",{key:10,class:"-mt-8 mb-8 flex w-full items-center justify-between border-b border-gray-300 py-3 text-xl",onClick:o[1]||(o[1]=Lt(y=>{var H;return a(Ut)(`${(H=a(R))==null?void 0:H.id}`,O.value),w.value=!1},["prevent"])),onMouseenter:o[2]||(o[2]=y=>w.value=!0),onMouseleave:o[3]||(o[3]=y=>w.value=!1)},[s("span",$l,[!L.value&&!w.value?(t(),n("span",Pl,"Volg "+r(O.value),1)):i("",!0),!L.value&&w.value?(t(),n("span",Sl,"Volg "+r(O.value),1)):i("",!0),L.value&&!w.value?(t(),n("span",Il,"Favoriet")):i("",!0),L.value&&w.value?(t(),n("span",Bl,"Niet meer volgen")):i("",!0),s("span",{class:K(["btn btn-ghost btn-xxs absolute right-0 !bg-white hover:!bg-white",{"!border-black":L.value,"!border-gray-200":!L.value||w.value}])},[L.value&&w.value?(t(),n("span",Tl,[u(Fe,{class:"mr-1.5 size-3 stroke-black"}),zl])):i("",!0),L.value&&!w.value?(t(),n("span",Ll,[u(We,{class:"mr-1.5 size-3 fill-none stroke-black"}),Cl])):i("",!0),L.value?i("",!0):(t(),n("span",Dl,[u(Ee,{class:"mr-1.5 size-3 stroke-black"}),w.value?i("",!0):(t(),n("span",Al,"Volg")),w.value?(t(),n("span",Vl,"Volg "+r(O.value),1)):i("",!0)]))],2)])],32)):i("",!0)])])]),s("div",Nl,[a(be)&&a(be).length>0?(t(),n("div",Ol,[s("div",Rl,[u(ks,{data:a(be)[0]},null,8,["data"])])])):i("",!0),s("div",jl,[u(xe,{id:"squeezely-related",class:"mb-14"}),u(xe,{id:"squeezely-recommended",class:"mb-14"}),u(xe,{id:"squeezely-last-viewed",class:"mb-14"}),s("div",Ul,[Hl,s("ul",Ml,[s("li",null,[u(U,{class:"block border-b border-gray-300 py-3 md:border md:border-black md:px-4 md:uppercase md:tracking-widest",to:{name:"merken-slug",params:{slug:Ce.value}}},{default:h(()=>[M(r(O.value),1)]),_:1},8,["to"])]),(t(!0),n(G,null,ee(De.value,(y,H)=>(t(),n("li",{key:`cat-${H}`},[u(U,{to:y.categoryUrl,class:"block border-b border-gray-300 py-3 md:border md:border-black md:px-4 md:uppercase md:tracking-widest"},{default:h(()=>[M(r(y.categoryName),1)]),_:2},1032,["to"])]))),128)),(t(!0),n(G,null,ee((Xe=De.value)==null?void 0:Xe.slice(0,15),(y,H)=>(t(),n("li",{key:`cat-brand-${H}`},[u(U,{to:`${y.categoryUrl}?brand=${ze.value}`,class:"block border-b border-gray-300 py-3 md:border md:border-black md:px-4 md:uppercase md:tracking-widest"},{default:h(()=>[M(r(O.value+" "+y.categoryName),1)]),_:2},1032,["to"])]))),128))])])]),s("div",Fl,[s("div",Wl,[s("div",El,[u(ys,{class:"size-16 flex-none"}),s("div",ql,[(et=(Ze=a($))==null?void 0:Ze.fields)!=null&&et.serviceBlock1Title?(t(),n("div",Kl,r(a($).fields.serviceBlock1Title),1)):i("",!0),(st=(tt=a($))==null?void 0:tt.fields)!=null&&st.serviceBlock1Description?(t(),n("p",Gl,r(a($).fields.serviceBlock1Description),1)):i("",!0)])]),s("div",Ql,[u(xs,{class:"size-16 flex-none"}),s("div",Jl,[(ot=(at=a($))==null?void 0:at.fields)!=null&&ot.serviceBlock2Title?(t(),n("div",Yl,r(a($).fields.serviceBlock2Title),1)):i("",!0),(nt=(lt=a($))==null?void 0:lt.fields)!=null&&nt.serviceBlock2Description?(t(),n("p",Xl,r(a($).fields.serviceBlock2Description),1)):i("",!0)])]),s("div",Zl,[u(ws,{class:"size-16 flex-none"}),s("div",en,[(ct=(it=a($))==null?void 0:it.fields)!=null&&ct.serviceBlock3Title?(t(),n("div",tn,r(a($).fields.serviceBlock3Title),1)):i("",!0),(ut=(rt=a($))==null?void 0:rt.fields)!=null&&ut.serviceBlock3Description?(t(),n("p",sn,r(a($).fields.serviceBlock3Description),1)):i("",!0)])])])]),s("div",an,[s("div",on,[s("div",ln,[(vt=(_t=(mt=(pt=(dt=a($))==null?void 0:dt.fields)==null?void 0:pt.serviceImage)==null?void 0:mt.fields)==null?void 0:_t.file)!=null&&vt.url?(t(),n("img",{key:0,src:a($).fields.serviceImage.fields.file.url,alt:a($).fields.serviceImage.fields.description,height:"142",width:"142",class:"absolute left-0 top-0 aspect-1 size-20 rounded-full object-cover md:static md:size-[142px]"},null,8,nn)):i("",!0),s("div",null,[cn,(bt=(ft=a($))==null?void 0:ft.fields)!=null&&bt.serviceDescription?(t(),n("p",rn,r(a($).fields.serviceDescription),1)):i("",!0),(gt=(ht=a($))==null?void 0:ht.fields)!=null&&gt.serviceButtonLink&&((yt=(kt=a($))==null?void 0:kt.fields)!=null&&yt.serviceButtonText)?(t(),P(U,{key:1,to:a($).fields.serviceButtonLink,class:"inline-flex items-center gap-2 underline hover:no-underline"},{default:h(()=>[u($s,{class:"-ml-0.5 size-6"}),M(" "+r(a($).fields.serviceButtonText),1)]),_:1},8,["to"])):i("",!0)])])]),(xt=a(F))!=null&&xt.fields?(t(),n("div",un,[s("div",dn,[(St=(Pt=($t=(wt=a(F).fields)==null?void 0:wt.pageImage)==null?void 0:$t.fields)==null?void 0:Pt.file)!=null&&St.url?(t(),n("img",{key:0,src:a(F).fields.pageImage.fields.file.url,alt:a(F).fields.pageImage.fields.description,class:"size-full object-cover"},null,8,pn)):i("",!0)]),s("div",mn,[s("div",_n,r(a(F).fields.pageTitle),1),s("div",vn,r(a(F).fields.pageTitle),1),s("p",fn,r(a(F).fields.metaDescription),1),s("div",bn,[u(U,{to:`/${a(F).fields.slug}`,class:"btn bg-yellow-900 text-white"},{default:h(()=>[hn]),_:1},8,["to"])])])])):(t(),n("div",gn)),s("ul",kn,[(t(!0),n(G,null,ee([{to:"/",value:"Home"},...je.value],(y,H)=>(t(),n("li",{key:"breadcrumb-"+H,class:"flex items-center"},[u(U,{to:y.to,class:"text-xs capitalize underline hover:no-underline"},{default:h(()=>[M(r(y.value),1)]),_:2},1032,["to"]),yn]))),128))])])])])])):i("",!0)}}});export{jn as default};