import b from"./CjwUjZgp.js";import{b6 as P,V as x,q as v,H as w,e as f,d as D,b as T,bc as y,w as A,f as L,t as k,x as C,g as p,c as S,o as h,_ as N}from"./BxiWQxwE.js";import"./BrNSTs1P.js";import"./BiNVmQQE.js";import"./BrKUAZRL.js";import"./BoIRubSN.js";import"./D0yXLBOh.js";import"./D5VgotcR.js";import"./CMz6t2zu.js";import"./MnXbh1QW.js";import"./D1QcpLk0.js";import"./82sW_ACQ.js";import"./C5DGPL5e.js";import"./DaeL3UWZ.js";import"./C-_VXZri.js";import"./DbZappjS.js";import"./Cn_S6Ehm.js";import"./D4iyY66W.js";import"./CmScLukR.js";import"./BuMsBOrl.js";import"./BtFqvK5V.js";import"./DXn7UZRN.js";import"./4HfP1VOY.js";import"./QMEN6lyk.js";import"./CxeYIrhH.js";import"./CMsHgkl0.js";import"./D_RcVxUu.js";import"./CoLpCmXN.js";const E=()=>{const{query:m}=P(),e=x().public.defaultStoreId,o=v(`${w}-storeId`),n=f(()=>{var r,t;return(r=o.value)!=null&&r.storeId?Number((t=o.value)==null?void 0:t.storeId):Number(e)});return{getThemeList:r=>m({getThemeList:[{themeListId:r},{themeListProducts:{position:!0,productsAssortment:[{storeId:n.value},{endDate:!0,isSingleUsePlastic:!0,normalPrice:!0,offerPrice:!0,priceDate:!0,productId:!0,productNumber:!0,startDate:!0,storeId:!0,productInformation:{brand:!0,department:!0,headerText:!0,image:!0,isWeightProduct:!0,maxAmount:!0,packaging:!0,productId:!0,subText:!0,webgroup:!0,logos:{description:!0,image:!0,link:!0,position:!0,sourceId:!0}},productOffer:{disclaimerEndDate:!0,disclaimerStartDate:!0,endDate:!0,productId:!0,startDate:!0,textPriceSign:!0}}]}}]})}},q={class:"theme-list"},B=D({__name:"thema",props:{item:{type:Object,default:null}},async setup(m){let e,o;const n=m,{getThemeList:d}=E(),{mapProductAssortmentToProductCard:r}=T(),t=y(n.item),g=f(()=>t==null?void 0:t.theme.values.find(c=>c.id===t.theme.value)),{data:l}=([e,o]=A(async()=>S("themalist",async()=>{var s,u;if(!(t!=null&&t.theme))return[];const a=(((u=(s=(await d(Number(t.theme.customId))).getThemeList)==null?void 0:s.themeListProducts)==null?void 0:u.filter(i=>i.productsAssortment!==null))||[]).sort((i,I)=>i.position-I.position);return a==null?void 0:a.map(i=>r(i.productsAssortment))})),e=await e,o(),e);return(c,a)=>{var s,u;const _=b;return h(),L("div",q,[(s=p(l))!=null&&s.length?(h(),k(_,{key:0,products:p(l),"list-name":(u=p(g))==null?void 0:u.name,"show-categories":!1,"show-departments":!1},null,8,["products","list-name"])):C("",!0)])}}}),ct=N(B,[["__scopeId","data-v-906e493b"]]);export{ct as default};
