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