1import ce from"./sU6vdKUM.js";import{_ as fe}from"./BWnuL0-X.js";import{_ as ge}from"./DVJpZpDO.js";import{_ as be}from"./CxWhAIQ3.js";import{_ as he}from"./_WNXWDaQ.js";import{_ as _e}from"./CONnuQv7.js";import{_ as ye}from"./B-_vzWyg.js";import{_ as ke}from"./Dsns_fgA.js";import{_ as xe}from"./DLwAILOD.js";import{_ as ve}from"./DRJapcb7.js";import{_ as we}from"./BjWa-xAP.js";import{u as Z}from"./6tGKLvoR.js";import{y as G,P as m,$ as t,Z as u,z as s,L as d,a5 as b,M as N,a4 as A,I as r,a2 as v,b as k,i as $e,d as M,_ as Le,H as x,O as f,N as z}from"./nlPHTZKi.js";import{_ as Pe}from"./t1nX69XE.js";import{k as Ce,s as Ie,b as Me,e as ze}from"./CiBNe_SP.js";import{u as je}from"./DEbJDECK.js";import{u as Ne}from"./khhR-VCD.js";import{u as Ae}from"./D0y-nH-0.js";import"./DL07ulgZ.js";import"./B9W97OLy.js";import"./BH8AhSQ_.js";import"./B7jpg4vJ.js";import"./BI003nAK.js";import"./l7iMdotX.js";import"./CsunOfFx.js";const Se={class:"my-[30px] hidden print:block"},We={class:"fixed right-[60px] top-[60px] z-50"},Te={class:"flex justify-end flex-col items-end"},Be={key:0},Re=["src","alt"],De=["src","alt"],Ue={class:"mt-3 mb-6 relative pt-[120px] left-[60px]"},Ve={class:"mt-2"},Ee={class:"pt-7"},Fe=["src","alt"],qe={class:"text-12 flex gap-2.5"},He={class:"text-gray"},Ke={class:"text-12 text-gray"},Oe={class:"mb-2.5 line-clamp-3 font-semibold text-12"},Ze=G({__name:"PrintLayout",props:{productList:{},wishlistName:{},primaryLogo:{},secondaryLogo:{}},setup(J){const{mediaApiBaseUrl:C}=Ce().public;return(l,i)=>{var I,h;return r(),m("main",Se,[t("header",We,[t("div",Te,[l.primaryLogo?(r(),m("a",Be,[t("img",{class:"h-8",src:("useCustomAssetsDomain"in l?l.useCustomAssetsDomain:s(Z))(l.primaryLogo.filename),alt:l.primaryLogo.alt},null,8,Re)])):u("",!0),l.secondaryLogo?(r(),m("img",{key:1,class:"h-2.5 mt-2 relative right-4",src:("useCustomAssetsDomain"in l?l.useCustomAssetsDomain:s(Z))(l.secondaryLogo.filename),alt:l.secondaryLogo.alt},null,8,De)):u("",!0)])]),t("section",Ue,[t("div",null,[i[3]||(i[3]=t("div",{class:"flex"},[t("h3",{class:"text-black text-xl font-bold leading-[normal]"}," Mein Merkzettel "),t("img",{src:Pe,alt:"Punkt",class:"inline relative sm:w-2.5 sm:h-2.5 top-2 left-0.5 sm:left-[7px] sm:top-5 w-3 h-3"})],-1)),t("p",Ve,[i[0]||(i[0]=d(" Aktuell befinden sich ")),t("strong",null,b(((I=l.productList)==null?void 0:I.length)??0)+" "+b(((h=l.productList)==null?void 0:h.length)===1?"Produkt":"Produkte"),1),i[1]||(i[1]=d(" auf Ihrem Merkzettel ")),t("strong",null,'"'+b(l.wishlistName)+'"',1),i[2]||(i[2]=d(". "))]),t("div",Ee,[(r(!0),m(N,null,A(l.productList,(a,y)=>{var w;return r(),m("div",{key:a.id_product_concrete,class:v(["flex gap-5 border-b border-gray-300 p-1 product-item",{"break-after-page":(y+1)%12===0&&y+1!==l.productList.length}])},[t("img",{src:`${s(C)}/570x570/${(w=a.product_images)==null?void 0:w[0]}`,alt:a.name,class:"object-contain w-[48px] max-h-[48px] aspect-square"},null,8,Fe),t("div",null,[t("div",qe,[t("span",He,b(a.manufacturer),1),t("p",Ke," Werksart.-Nr.: "+b(a.factory_item_identifier),1),t("div",null,[(r(),m(N,null,A(3,$=>t("span",{class:v({"text-gray-800":$<=3-Number(a.price_range),"text-black":$>3-Number(a.price_range)})},"â¬",2)),64))])]),t("p",Oe,b(a.name),1)])],2)}),128))])])]),i[4]||(i[4]=t("footer",{class:"fixed left-[60px] bottom-[60px] z-50"},[t("span",{class:"font-bold text-12"},"badpunkt.de")],-1))])}}}),Ge={class:"print:hidden"},Je={key:0,class:"px-3 mb-20 mx-auto lg:container md:px-9 xl:px-0"},Qe={class:"flex justify-between md:justify-start items-center gap-2.5"},Xe={class:"max-md:!hidden"},Ye={class:"container py-8 md:pb-12"},et={class:"flex justify-center items-center gap-5"},tt={key:0,class:"text-34 flex justify-center items-center gap-4 font-extrabold text-center leading-[48px] md:text-48 break-word"},st={class:"grid gap-5 lg:grid-cols-3 xl:gap-16"},nt={class:"space-y-5 lg:order-2"},ot={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-1"},rt=["disabled"],lt=["disabled"],it={class:"space-y-5 lg:col-span-2"},at={class:"flex items-center justify-between gap-5 lg:mb-5"},ut=["disabled"],dt={key:0,class:"space-y-5"},mt={key:1,class:"px-5 py-16 mb-20 bg-gray-300 space-y-7"},pt={class:"flex justify-center"},ct=["disabled"],Dt=G({__name:"WishlistDetailPage",props:{blok:{}},setup(J){const C=je(),{wishlists:l}=Ie(C),i=Me(),I=ze(),h=k([]),a=k(!1),y=k(!1),w=k(!1),$=k(!1),n=k(null),L=$e("siteConfig"),S=L==null?void 0:L.header_logo,W=L==null?void 0:L.header_logo_print_wishlist,T=M(()=>{var e;let o=(e=n.value)==null?void 0:e.name;return o||(o=decodeURIComponent(i.path.split("/").pop())),`${o} | badpunkt`});Ne({title:T,ogTitle:T}),Le(async()=>{D(),j()});const p=M(()=>{var o;return((o=n.value)==null?void 0:o.productIds.length)===0}),B=M(()=>!!(!a.value&&n.value)),Q=k([{url:"/meine-merkzettel",name:"Meine Merkzettel"}]),R=k(""),X=()=>{var o,e;return(o=i.query)!=null&&o.pids||D(),((e=n.value)==null?void 0:e.productIds.map(c=>c))||[]},j=async()=>{var e;if(!((e=n.value)!=null&&e.productIds.length))return;a.value=!0;const o=await Ae(X(),"badpunkt");h.value=(o==null?void 0:o.products.map(c=>c.attributes))||[],a.value=!1},Y=()=>{n.value&&C.deleteAllProductsFromWishlist(n.value),y.value=!1,j()},ee=o=>{const e=i.path.split("/").slice(0,-1).join("/")+"/"+encodeURIComponent(o);I.push({path:e})},te=M(()=>{var c,P,g;if(!n.value)return"";const o=new URL(window.location.origin+"/neuer-merkzettel"),e=((P=(c=n.value)==null?void 0:c.productIds)==null?void 0:P.join(","))||"";return o.searchParams.set("name",((g=n.value)==null?void 0:g.name)||""),o.searchParams.set("pids",e),encodeURI(o.toString())}),D=()=>{var e,c;
1const o=decodeURIComponent(((e=i.path.split("/").filter(Boolean).at(-1))==null?void 0:e.toLowerCase())||"");n.value=l.value.find(P=>P.name.toLowerCase()===o)||null,R.value=((c=n.value)==null?void 0:c.name)||""},se=()=>{p.value||(I.push("/termin-vereinbaren"),n.value&&C.setAppointmentWishlist(n.value))},ne=()=>{p.value||window.print()};return(o,e)=>{var U,V,E,F,q,H,K,O;const c=ce,P=fe,g=ge,oe=be,re=he,le=_e,ie=ye,ae=ke,ue=xe,de=ve,me=we,pe=Ze;return r(),m("section",null,[t("div",Ge,[f(c,{loading:!s(B),"full-screen":""},null,8,["loading"]),s(B)?(r(),m("div",Je,[t("div",Qe,[t("div",Xe,[f(P,{breadcrumbs:s(Q),"current-page-name":s(R)},null,8,["breadcrumbs","current-page-name"])])]),t("div",Ye,[t("div",et,[(U=s(n))!=null&&U.name?(r(),m("h1",tt,b((V=s(n))==null?void 0:V.name),1)):u("",!0),f(oe,{text:"Merkzettel umbenennen"},{default:z(()=>[t("button",{class:"text-primary hover:text-primary-150 block",onClick:e[0]||(e[0]=_=>$.value=!0)},[f(g,{name:"edit",class:"text-32"})])]),_:1})]),s($)?(r(),x(re,{key:0,type:"edit-list-name",wishlist:s(n),onClose:e[1]||(e[1]=_=>$.value=!1),onEditListName:ee},null,8,["wishlist"])):u("",!0)]),t("div",st,[t("div",nt,[e[11]||(e[11]=t("h2",{class:"text-xl font-bold"},"Informationen teilen.",-1)),e[12]||(e[12]=t("p",{class:"text-gray"},[d(" Sie haben Produkte und Marken für Ihr Bad nach Ihren Wunschvorstellungen gefunden? Wunderbar!"),t("br"),t("br"),d("Klicken Sie auf "),t("strong",null,"âTermin vereinbarenâ"),d(" um einen Beratungstermin in einer badpunkt Ausstellung in Ihrer Nähe zu vereinbaren. Ihr Merkzettel wird gemeinsam mit Ihrer Terminanfrage an die jeweilige Ausstellung übermittelt. ")],-1)),t("div",ot,[t("button",{class:v([s(p)?"opacity-30 saturate-0 cursor-not-allowed":"","flex items-center justify-center w-full gap-3 p-3 font-bold text-center uppercase transition border-2 rounded-full border-primary text-primary hover:text-white hover:bg-primary"]),disabled:s(p),onClick:e[2]||(e[2]=_=>w.value=!0)},[f(g,{name:"share",class:"text-xl"}),e[7]||(e[7]=d(" Merkzettel teilen "))],10,rt),s(w)&&s(n)?(r(),x(le,{key:0,wishlist:s(n),"copy-link":s(te),"email-subject":(E=s(n))==null?void 0:E.name,title:"Merkzettel teilen.",description:`Teilen Sie Ihren Merkzettel ganz einfach: Versenden Sie ihn per E-Mail oder teilen 2Sie einen Link, um Ihre favorisierten Produkte mit anderen zu teilen.`,onClose:e[3]||(e[3]=_=>w.value=!1)},{content:z(()=>[t("p",null,[e[8]||(e[8]=d(" Link zu ")),t("strong",null,"â"+b(s(n).name)+"â:",1)])]),_:1},8,["wishlist","copy-link","email-subject"])):u("",!0),t("button",{class:v([s(p)?"opacity-30 saturate-0 cursor-not-allowed":"","flex items-center justify-center w-full gap-3 p-3 font-bold text-center uppercase transition border-2 rounded-full border-primary text-primary hover:text-white hover:bg-primary"]),disabled:s(p),onClick:ne},[f(g,{name:"printer",class:"text-xl"}),e[9]||(e[9]=d(" Merkzettel drucken "))],10,lt),f(ie,{class:v([s(p)?"opacity-30 saturate-0 cursor-not-allowed":"cursor-pointer","flex items-center justify-center w-full gap-3 p-3 font-bold text-center text-white uppercase transition border-2 rounded-full lg:col-span-1 md:col-span-2 bg-primary border-primary hover:bg-transparent hover:text-primary"]),onClick:se},{default:z(()=>[f(g,{name:"calendar",weight:"bold",class:"text-lg"}),e[10]||(e[10]=d(" Termin vereinbaren "))]),_:1,__:[10]},8,["class"])])]),t("div",it,[t("div",at,[t("p",null,[e[13]||(e[13]=d(" Aktuell befinden sich ")),t("strong",null,b((F=s(n))==null?void 0:F.productIds.length)+" "+b(((q=s(n))==null?void 0:q.productIds.length)===1?"Produkt":"Produkte"),1),e[14]||(e[14]=d(" auf Ihrem Merkzettel. "))]),t("button",{class:v([s(p)?"opacity-30 saturate-0 cursor-not-allowed":"","flex items-center justify-center gap-3 p-3 font-bold text-center uppercase transition border-2 rounded-full shrink-0 border-primary text-primary hover:bg-primary hover:text-white"]),disabled:s(p),onClick:e[4]||(e[4]=_=>y.value=!0)},[f(g,{name:"trash",class:"text-xl"}),e[15]||(e[15]=t("span",{class:"max-lg:hidden"},"Alle Produkte löschen",-1))],10,ut)]),s(h).length?(r(),m("div",dt,[(r(!0),m(N,null,A(s(h),_=>(r(),x(ae,{key:_.id_product_concrete,product:_,wishlist:s(n),onUpdateWishlistProducts:j},null,8,["product","wishlist"]))),128))])):u("",!0),!s(h).length&&!s(a)?(r(),m("div",mt,[t("div",pt,[f(g,{name:"heart",class:"text-60"}),e[16]||(e[16]=t("span",{class:"flex items-center justify-center -ml-5 text-xl text-white rounded-full bg-primary h-7 w-7"},"+",-1))]),e[17]||(e[17]=t("p",{class:"text-center"}," Es wurden noch keine Produkte auf die Liste gesetzt. ",-1))])):u("",!0),t("button",{class:v([s(p)?"opacity-30 saturate-0 cursor-not-allowed":"","flex items-center justify-center w-full gap-3 p-3 font-bold text-center uppercase transition border-2 rounded-full md:ml-auto md:w-auto md:px-6 shrink-0 border-primary text-primary hover:bg-primary hover:text-white"]),disabled:s(p),onClick:e[5]||(e[5]=_=>y.value=!0)},[f(g,{name:"trash",class:"text-xl"}),e[18]||(e[18]=t("span",null,"Alle Produkte löschen",-1))],10,ct),s(y)?(r(),x(ue,{key:2,"submit-button-label":"ENTFERNEN",onConfirm:Y,onClose:e[6]||(e[6]=_=>y.value=!1)},{content:z(()=>e[19]||(e[19]=[t("p",{class:"text-start text-lg"},[t("strong",null," Sind Sie sicher, dass Sie alle Produkte von Ihrem Merkzettel entfernen möchten? ")],-1)])),_:1})):u("",!0)])])])):u("",!0),(H=o.blok.disturber)!=null&&H[0]?(r(),x(de,{key:1,blok:o.blok.disturber[0]},null,8,["blok"])):u("",!0),(K=o.blok.links)!=null&&K[0]?(r(),x(me,{key:2,blok:o.blok.links[0],class:"-mb-10"},null,8,["blok"])):u("",!0)]),!s(a)&&s(h).length&&s(n)&&s(S)&&s(W)?(r(),x(pe,{key:0,"product-list":s(h),"wishlist-name":(O=s(n))==null?void 0:O.name,"primary-logo":s(S),"secondary-logo":s(W),class:"hidden print:block"},null,8,["product-list","wishlist-name","primary-logo","secondary-logo"])):u("",!0)])}}});
2export{Dt 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.