import{_ as Y}from"./lZjBw0yj.js";import{e as z,p as tt,d as et,k as st,i as ot,A as T,j as at,l as it,a as nt,w as rt}from"./AHiYuuv4.js";import{_ as lt,D as ct}from"./Jzjg1sWV.js";import{_ as mt}from"./u4dmiDIy.js";import{_ as dt}from"./C5qvglTP.js";import{u as ut,b as pt,g as _t}from"./CdTn0kqS.js";import{u as gt}from"./BXzz6d_D.js";import{r as ft}from"./WIGXBe3c.js";import{l as kt,a0 as y,b as A,k as D,u as t,E as n,P as p,V as r,J as S,Z as E,L as l,N as k,Q as c,F,a6 as ht,U as V,H as v}from"./DEIzhR9A.js";import"./McvZN_Cb.js";import"./rHjvo5f9.js";import"./Dqvtgzyr.js";import"./BJFSaJwp.js";import"./CYLXjrQd.js";import"./-IL9qb0M.js";import"./DNLPUXkS.js";import"./lm07vBh-.js";import"./CKdW9TyB.js";import"./B5Zp2Vr1.js";import"./BlYltdjn.js";import"./ArJcqVXA.js";import"./D0Qws29C.js";import"./CAQNniay.js";import"./CigU-tWz.js";import"./nLZJejse.js";import"./BNS08PCs.js";import"./D8sTzVSg.js";import"./DW-wVgF4.js";import"./BQkHUO2l.js";import"./C4LJZt9n.js";const wt=async function(I,e){const o=z(),m=tt();return await ft(o,"getLookbookDetailById",m.value)({slug:I,id:e})},bt={key:0,class:"mb-16 md:flex md:space-x-20"},xt={class:"flex flex-col space-y-0.5 md:w-1/2"},yt={class:"px-5 pt-5 md:w-1/2 md:pl-0 md:pr-10 md:pt-14"},vt={class:"text-sm"},It={class:"mt-4 hidden justify-between md:flex"},Ct={class:"text-sm"},$t={class:"text-center md:hidden"},Lt={class:"text-sm"},ae=kt({__name:"[id]",async setup(I){let e,o;const m=et(),C=st(),{$alert:$,$i18n:L,$helpers:G}=z(),B=([e,o]=y(()=>pt()),e=await e,o(),e),O=([e,o]=y(()=>gt()),e=await e,o(),e),_=A(!0),P=`/women/lookbooks/${m.params.slug}`,U=m.params.id.toString(),h=([e,o]=y(()=>wt(P,U)),e=await e,o(),e);if(!h.detailItem)throw ot({fatal:!0,statusCode:404,statusMessage:"Page Not Found"});_.value=!1;const{trackAddToBasket:j,trackSelectItem:R}=ut(),d=D(()=>h.detailItem),u=D(()=>h.products||[]),W=({variant:s,product:a})=>{var f;if(!s){$.show(L.t("basket.notification.add_basket"),T.confirm);return}const b=(f=at(s.attributes,"vendorSize"))==null?void 0:f.label,g=1;O.addItem({variantId:s.id,quantity:g}),j({product:a,quantity:g,variant:s}),$.show(L.t("basket.notification.add_to_cart",{selectedVariantLabel:b}),T.route,C(G.route.routes.basket.name))},w=A(!1),q=()=>{w.value=!0},H=()=>{w.value=!1},M=(s,a)=>{R({product:s,category:_t(s.categories),listingMetaData:{name:"LookbooksList",id:"LBK"},index:a+1,source:`lookbook|${m.params.slug}`,soldOut:s.isSoldOut})},J=B.findItem,K=B.toggleItem;return(s,a)=>{const b=Y,g=rt,f=it,N=nt,Q=lt,Z=mt,X=dt;return!t(_)&&t(d)?(n(),p("div",bt,[r("div",xt,[(n(!0),p(S,null,E(t(d).detail_images,(i,x)=>(n(),p("button",{key:x,onClick:q},[l(b,{provider:"storyblok",src:i.image.filename,alt:i.image.alt,class:"w-full object-cover",loading:"lazy",quality:"85"},null,8,["src","alt"])]))),128))]),r("div",yt,[r("div",vt,[l(f,{to:t(C)(P),class:"hidden align-middle md:flex"},{default:k(()=>[l(g,{icon:"UiBack",class:"mr-2"}),v(" "+c(s.$t("back")),1)]),_:1},8,["to"])]),r("div",It,[l(N,{size:"2xl",type:"loud"},{default:k(()=>[v(c(t(d).title),1)]),_:1}),r("span",Ct,c(t(u).length)+" "+c(s.$t("products",t(u).length)),1)]),r("div",$t,[l(N,{size:"lg",type:"loud"},{default:k(()=>[v(c(t(d).title),1)]),_:1}),r("span",Lt," / "+c(t(u).length)+" "+c(s.$t("products",t(u).length)),1)]),l(Q,{class:"mt-4 grid w-auto grid-cols-1 gap-1 sm:grid-cols-2 lg:grid-cols-3",refreshing:t(_),loading:t(_),products:t(u),"is-in-wishlist":t(J),"show-add-to-cart":!0,columns:3,"per-page":t(ct),"onClick:addToBasket":W,"onClick:toggleProductWishlist":a[0]||(a[0]=i=>t(K)({productId:i.id})),"onClick:product":M},null,8,["refreshing","loading","products","is-in-wishlist","per-page"])]),(n(),F(ht,{to:"#backdrop"},[l(X,null,{default:k(()=>[t(w)?(n(),p("div",{key:0,class:"absolute left-0 top-0 z-50 bg-white text-center",onClick:a[1]||(a[1]=i=>H())},[(n(!0),p(S,null,E(t(d).detail_images,(i,x)=>(n(),F(Z,{key:x,provider:"storyblok",src:i.image.filename,alt:i.image.alt,sizes:"sm:100vw md:100vw lg:100vw xl:100vw xxl:100vw 2048:100vw",class:"w-full"},null,8,["src","alt"]))),128))])):V("",!0)]),_:1})]))])):V("",!0)}}});export{ae as default};