1import{_ as H}from"./Bl1_2KaR.js";import{d as B,u as O,r as L,o,f as l,h as c,w,g as t,k as b,m as f,i as n,t as r,l as T,B as X,F as W,v as j,z as q,x as A,O as J,G as _,au as Q,av as E,c as M,aw as Y,ax as Z,X as tt,j as et,q as st,E as ot}from"./CO53y7R9.js";import{_ as nt}from"./BxVm48TJ.js";import at from"./QwjcUrC_.js";import{_ as lt}from"./hlz-70HY.js";import ct from"./BPyjenwY.js";import{u as R}from"./CzdqogrS.js";import rt from"./DQeX8nO8.js";import{_ as it}from"./CjsUKTle.js";import"./B_HHoUwV.js";import"./hyjV0oe_.js";import"./CXOatb-J.js";import"./Dd0vgfBB.js";import"./CYrm8cgi.js";const ut={class:"flex flex-col"},dt={class:"pt-xs xl:pt-md"},mt={class:"flex justify-between xl:pb-xxs"},pt={key:0,class:"text-subline-small text-black-60 leading-[22px]"},_t={class:"flex gap-xs items-center ml-auto"},xt={"aria-label":"Produkt zu Warenkorb hinzufügen",class:"h-[22px] xl:h-[24px]"},ht={class:"font-semibold text-body inline-block"},gt={key:0,class:"flex items-center mb-md mt-auto"},ft={key:0},bt={key:2,class:"flex gap-md mt-auto"},yt={class:"xs:text-subline-small xs:leading-[16px] md:text-subline text-black-60 hover:text-cta"},vt={class:"flex items-center justify-center xs:text-subline-small md:text-subline size-2xl text-black-60 leading-8 border hover:border-cta border-black-60 hover:border-b-cta rounded-full shrink-0 xs:size-[26px] xs:leading-[26px] md:size-[36px] md:leading-[36px]"},kt={class:"md:hidden font-semibold"},wt={class:"hidden md:block font-semibold"},Pt={class:"px-lg py-2xl"},$t=B({__name:"ProductTile",props:{product:{},lazy:{type:Boolean},listName:{},index:{},pageSize:{}},setup(P){const{t:d}=O(),{trackSelectItem:x}=R(),s=P,y=_(()=>s.listName||"Product Listing"),e=L(s.product.children?.[0]??s.product),$=_(()=>e.value?.calculatedPrice),v=_(()=>Q(e.value?.seoUrls??[])),i=_(()=>s.product.customFields?.brand?s.product.customFields.brand:s.product.manufacturer?.customFields?.custom_show_manufacturer_in_frontend?s.product.manufacturer?.customFields?.shortName||s.product.manufacturer?.translated?.name:""),N=_(()=>e.value?.name),k=L(!1),C=L(!1),z=_(()=>!!s.product.children?.some(m=>{const a=m.properties??[],F=a.find(u=>(u.group?.name??"")==="Kombobox Shop");if(!F)return!1;const S=(F.name??"").trim();if(!S)return!1;const I=a.filter(u=>(u.group?.name??"").trim()===S);return I.length?I.some(u=>(u.group?.displayType??"")!=="media"):!1})),h=_(()=>{const m=s.product.activeChildCount;return typeof m=="number"&&!Number.isNaN(m)?m:s.product.children?.length??0}),V=m=>{e.value?.customFields?.energyLabel&&(C.value=m,k.value=!0)},g=()=>{x(e.value,y.value)};return(m,a)=>{const F=H,S=T,I=nt,u=X,U=at,K=lt,D=ct,G=J;return o(),l("div",ut,[c(u,{to:t(v),class:"block",onClick:g},{default:w(()=>[t(e)?.cover?.media?(o(),b(F,{key:0,media:t(e).cover.media,product:t(e),"parent-id":P.product.id,lazy:P.lazy,"image-class":"h-full w-full aspect-square",class:"bg-white aspect-square","show-wishlist-button":"","with-badges":"",shadow:""},null,8,["media","product","parent-id","lazy"])):f("",!0),n("div",dt,[n("div",mt,[t(i)?(o(),l("span",pt,r(t(i)),1)):f("",!0),n("div",_t,[n("button",xt,[c(S,{name:"small:shopping-bag",class:"xl:size-[24px]"})])])]),n("span",ht,r(t(N)),1),c(I,{class:"pb-xxs",price:t($),"advertising-key":!!t(e)?.customFields?.advertisingKey},null,8,["price","advertising-key"])])]),_:1},8,["to"]),s.product.children?.some(p=>p.customFields?.energyLabel)||t(e)?.customFields?.datasheet?(o(),l("div",gt,[(o(!0),l(W,null,j(s.product.children,p=>(o(),b(U,{key:p.id,product:p,class:"mr-md",onClick:a[0]||(a[0]=Bt=>V(!0))},null,8,["product"]))),128)),t(e)?.customFields?.datasheet?(o(),l("div",ft,[c(u,{to:t(e)?.customFields?.datasheet,class:"ms-xxs bg-transparent xs:text-subline-small lg:text-subline text-cta underline font-semibold py-xs hover:text-primary-40 focus:text-primary active:text-primary-40 disabled:text-black-40",target:"_blank",rel:"noopener noreferrer"},{default:w(()=>[q(r(t(d)("cms.element.product.tile.product_data","Produktdatenblatt")),1)]),_:1},8,["to"])])):f("",!0)])):f("",!0),!t(z)&&s.product.children&&t(h)>0?(o(),b(K,{key:1,products:s.product.children,"active-child-count":t(h),"parent-product":s.product,class:"mt-auto","onUpdate:selectedVariant":a[1]||(a[1]=p=>e.value=p)},null,8,["products","active-child-count","parent-product"])):t(z)&&t(h)>1?(o(),l("div",bt,[c(u,{to:t(v),class:"flex items-center justify-between xs:gap-xs md:gap-md text-subline text-black-60",onClick:g},{default:w(()=>[n("span",yt,r(t(d)("cms.element.product.tile.more_variants","Mehr Varianten verfügbar")),1),n("span",vt,[a[3]||(a[3]=n("span",{class:"font-semibold"},"+",-1)),n("span",kt,r(t(h)-1),1),n("span",wt,r(t(h)-1),1)])]),_:1},8,["to"])])):f("",!0),c(G,{modelValue:t(k),"onUpdate:modelValue":a[2]||(a[2]=p=>A(k)?k.value=p:null),class:"max-w-[1132px]"},{default:w(()=>[n("div",Pt,[t(C)?(o(),b(D,{key:0,class:"w-full h-full object-contain max-w-[300px] mx-auto",src:String(t(e).customFields?.energyLabel)},null,8,["src"])):f("",!0)])]),_:1},8,["modelValue"])])}}}),Nt=Object.assign($t,{__name:"ProductTile"}),Ct={key:0},zt={class:"mb-xl"},Ft={class:"mt-2xl grid gap-md gap-y-xl grid-cols-2 md:gap-2xl lg:gap-y-3xl lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5"},St={key:1},It={class:"mb-3xl"},Vt=B({__name:"WishlistProducts",setup(P){const{wishlist:d}=E(),{t:x}=O(),{trackViewItemList:s}=R(),y=M(),{data:e,status:$}=Y("/api/listing/wishlist",{method:"POST",key:`wishlist-page-${y.query.p??1}`,server:!1,body:{productIds:d.value,page:y.query.p}},"$pdkfRty8yI"),v=Z().public.productsPerPage??20;return tt(()=>{if(e.value){const i=e.value.elements;i&&i.length>0&&s(i,"Wishlist")}}),(i,N)=>{const k=Nt,C=rt,z=it,h=T,V=et;return t(e)?.elements?.length||t(d)?.length?(o(),l("div",Ct,[n("p",zt,r(t(x)("pages.wishlist.description","Speichern Sie hier Ihre persönlichen Favoriten - bis Sie das nächste Mal bei uns sind.")),1),n("div",Ft,[t(e)?.elements?.length?(o(!0),l(W,{key:0},j(t(e).elements,g=>(o(),b(k,{key:g.id,product:g,"list-name":"Wishlist","page-size":t(e)?.elements?.length},null,8,["product","page-size"]))),128)):t(d)?.length&&t($)==="pending"?(o(!0),l(W,{key:1},j(t(v),g=>(o(),b(C,{key:`product-skeleton-${g}`}))),128)):f("",!0)]),c(z,{class:"mt-[64px]","current-page":Number(t(e)?.page),"total-pages":Number(Math.ceil((t(e)?.total??0)/t(v)))},null,8,["current-page","total-pages"])])):(o(),l("div",St,[n("p",It,r(t(x)("pages.wishlist.empty","Die Wunschliste ist leer.")),1),c(V,{color:"primary",to:"/"},{default:w(()=>[c(h,{name:"small:chev-left"}),q(" "+r(t(x)("pages.wishlist.emptyButton","Weiter einkaufen")),1)]),_:1})]))}}}),Lt=Object.assign(Vt,{__name:"WishlistProducts"}),Wt={class:"px-xs pt-2xl pb-4xl lg:px-md"},jt={class:"mb-[6px] text-h2 md:text-h1"},Qt=B({__name:"wishlist",setup(P){const{wishlist:d}=E(),{customer:x}=st(),{t:s}=O(),y=M(),e=_(()=>`${x.value?.id}-${d.value?.join("-")}`);return($,v)=>{const i=Lt,N=ot;return o(),l("div",Wt,[n("h1",jt,r(t(s)("pages.wishlist.title","Ihre Wunschliste")),1),c(N,null,{default:w(()=>[(o(),b(i,{key:`${t(e)}-${t(y).query.p??1}`}))]),_:1})])}}});
1export{Qt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.