import{_ as v}from"./BuMsBOrl.js";import{d as h,b as x,a as C,e as a,r as O,f as c,x as g,g as t,i as N,v as _,A as P,o as m,bo as $,_ as j}from"./BxiWQxwE.js";import"./BtFqvK5V.js";import"./DXn7UZRN.js";import"./4HfP1VOY.js";import"./QMEN6lyk.js";import"./CxeYIrhH.js";import"./CMsHgkl0.js";const q={key:0},A={key:1},B=h({__name:"department",props:{department:{type:Object,required:!0},offers:{type:Object,required:!0}},setup(f){const p=f,{mapOfferToProductCard:u,filterOffersOnProducts:l}=x(),{$messages:n}=C(),e=a(()=>{var r,o,s;return(s=(o=(r=p.department)==null?void 0:r.controls)==null?void 0:o.title)==null?void 0:s.value}),b=a(()=>e.value?$(e==null?void 0:e.value):n("offers.title")),y=O(),k=a(()=>n("basket.gtm.offers.departments",{name:e.value})),d=a(()=>l(p.offers).map(s=>u(s)));return(r,o)=>{var i;const s=v;return(i=t(d))!=null&&i.length?(m(),c("section",{key:0,ref_key:"departmentRef",ref:y,class:P(["offers__department",`ofers__department--${t(b)}`])},[t(e)?(m(),c("h3",q,_(t(e)),1)):(m(),c("h3",A,_(t(n)("offers.title")),1)),N(s,{products:t(d),"list-name":t(k),department:f.department},null,8,["products","list-name","department"])],2)):g("",!0)}}}),S=j(B,[["__scopeId","data-v-69cbb45f"]]);export{S as default};
