const __vite__fileDeps=["shared/3j1fh/index-_04Sks9N.js","shared/3j1fh/vendor-wgE37vvX.js","shared/3j1fh/index-BSbFSSDG.css","shared/3j1fh/ModalProductDetail-7PqAGFOd.js","shared/3j1fh/ModalRemoveItem-DbSu_hH3.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
import{y as D,b as X,B as Y,G as ze,H as O,p as pe,q as R,T as ve,a as F,A as ge}from"./index-_04Sks9N.js";import{b as ee,P as fe,w as B,ar as he,as as ye,at as q,U as ke,s as x,y as N,A as be,o as c,e as z,k as d,l as h,C as te,t as k,m as a,p as we,f as l,v as y,F as S,B as xe,n as E,D as f,I as Me,g as L,J as W,S as G,q as Fe,i as $,h as P}from"./vendor-wgE37vvX.js";import $e from"./BasePageWrapper-DN0TgMqa.js";import{P as Z,_ as Pe}from"./ProductsCatalogGrid-BfTny-Zc.js";import{s as Ne}from"./striptags-BpeLwlJ7.js";import je from"./BaseBreadcrumb-BgXZbl5f.js";import{_ as Ce}from"./BaseTransitionCollapse-dgRtN0e1.js";import Te from"./BaseCategoriesSection-CiuXpp8P.js";import"./propertiesSvgs-BfofcfUi.js";const A=new WeakMap;function Ve(r,n,t={}){const{mode:e="replace",route:u=ee(),router:o=fe(),transform:p=_=>_}=t;A.has(o)||A.set(o,new Map);const i=A.get(o);let s=u.query[r];he(()=>{s=void 0});let v;const b=ye((_,M)=>(v=M,{get(){return _(),p(s!==void 0?s:q(n))},set(g){s!==g&&(s=g===n||g===null?void 0:g,i.set(r,g===n||g===null?void 0:g),M(),ke(()=>{if(i.size===0)return;const j=Object.fromEntries(i.entries());i.clear();const{params:C,query:w,hash:T}=u;o[q(e)]({params:C,query:{...w,...j},hash:T})}))}}));return B(()=>u.query[r],_=>{s=_,v()},{flush:"sync"}),b}function U(r){const n=r;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{cs:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Zobrazit moje oblíbené"])}},sk:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Zobraziť moje obľúbené"])}},pl:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Zobacz moje ulubione"])}},hu:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Mutasd a kedvenceimet"])}},de:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Meine Favoriten ansehen"])}},at:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Meine Favoriten ansehen"])}},ro:{view_my_favorites:t=>{const{normalize:e}=t;return e(["Arată favoritele mele"])}}}})}const Ae={class:"mr-2"},Be=["aria-label","title"],Le={class:"sr-only"},De={key:0,class:"mi-heart-fill icon-favorite text-danger"},Se={key:1,class:"mi-heart icon-favorite text-primary"},ne={__name:"ProductsFavoritesFilter",setup(r){const n=D(),{isFavoritesInFilter:t}=x(n),{t:e}=N(),u=X(),{isSignedIn:o}=x(u);return(p,i)=>{const s=be("VTooltip");return c(),z("span",Ae,[d(s,{theme:"baseTooltip"},{popper:h(()=>[te(k(a(e)("view_my_favorites")),1)]),default:h(()=>[a(o)?(c(),z("button",{key:0,type:"button",class:"btn p-1 rounded-circle","aria-label":a(e)("view_my_favorites"),title:a(e)("view_my_favorites"),onClick:i[0]||(i[0]=we(v=>a(n).toggleFilter("favorites"),["prevent"]))},[l("span",Le,k(a(e)("view_my_favorites")),1),a(t)?(c(),z("i",De)):(c(),z("i",Se))],8,Be)):y("",!0)]),_:1})])}}};typeof U=="function"&&U(ne);function K(r){const n=r;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{cs:{discount:t=>{const{normalize:e}=t;return e(["Mixy v akci"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegan"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Bez přidaného cukru"])},no_gluten:t=>{const{normalize:e}=t;return e(["Bez lepku"])},no_lactose:t=>{const{normalize:e}=t;return e(["Bez laktózy"])},protein:t=>{const{normalize:e}=t;return e(["Protein"])}},sk:{discount:t=>{const{normalize:e}=t;return e(["Mixy v akcii"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegán"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Bez pridaného cukru"])},no_gluten:t=>{const{normalize:e}=t;return e(["Bez lepku"])},no_lactose:t=>{const{normalize:e}=t;return e(["Bez laktózy"])},protein:t=>{const{normalize:e}=t;return e(["Proteín"])}},pl:{discount:t=>{const{normalize:e}=t;return e(["Mixy w promocji"])},for_vegan:t=>{const{normalize:e}=t;return e(["Wegański"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Bez dodatku cukru"])},no_gluten:t=>{const{normalize:e}=t;return e(["Bez glutenu"])},no_lactose:t=>{const{normalize:e}=t;return e(["Bez laktozy"])},protein:t=>{const{normalize:e}=t;return e(["Proteina"])}},hu:{discount:t=>{const{normalize:e}=t;return e(["Akciós Mixit"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegán"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Hozzáadott cukor nélkül"])},no_gluten:t=>{const{normalize:e}=t;return e(["Gluténmentes"])},no_lactose:t=>{const{normalize:e}=t;return e(["Laktózmentes"])},protein:t=>{const{normalize:e}=t;return e(["Fehérje"])}},de:{discount:t=>{const{normalize:e}=t;return e(["Mixe in Aktion"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegan"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Ohne Zuckerzusatz"])},no_gluten:t=>{const{normalize:e}=t;return e(["Glutenfrei"])},no_lactose:t=>{const{normalize:e}=t;return e(["Laktosefrei"])},protein:t=>{const{normalize:e}=t;return e(["Protein"])}},at:{discount:t=>{const{normalize:e}=t;return e(["Mixe in Aktion"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegan"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Ohne Zuckerzusatz"])},no_gluten:t=>{const{normalize:e}=t;return e(["Glutenfrei"])},no_lactose:t=>{const{normalize:e}=t;return e(["Laktosefrei"])},protein:t=>{const{normalize:e}=t;return e(["Protein"])}},ro:{discount:t=>{const{normalize:e}=t;return e(["Amestecuri cu reducere"])},for_vegan:t=>{const{normalize:e}=t;return e(["Vegan"])},no_added_sugar:t=>{const{normalize:e}=t;return e(["Fără zahăr adăugat"])},no_gluten:t=>{const{normalize:e}=t;return e(["Fără gluten"])},no_lactose:t=>{const{normalize:e}=t;return e(["Fără lactoză"])},protein:t=>{const{normalize:e}=t;return e(["Proteine"])}}}})}const Ie={id:"filters"},He={class:"row no-gutters mb-n1 mb-lg-n2 ml-n1 ml-lg-n2 pb-3 pb-md-4 pb-lg-5 pb-xl-6 list-unstyled"},Oe=["onClick"],Re={class:"d-none d-md-block"},qe={class:"small d-md-none"},Ee={key:0,class:"mi-times ml-1 ml-sm-2 ml-lg-3"},oe={__name:"ProductsFilters",setup(r){const{t:n}=N(),t=D(),{isInFilter:e}=x(t),u=[{name:n("for_vegan"),systemName:"for_vegan",icon:"vegan"},{name:n("no_lactose"),systemName:"no_lactose",icon:"no-lactose"},{name:n("no_gluten"),systemName:"no_gluten",icon:"no-gluten"},{name:n("no_added_sugar"),systemName:"no_added_sugar",icon:"no-sugar"},{name:n("discount"),systemName:"discount",icon:"discount"},{name:n("protein"),systemName:"protein",icon:"protein"}];return(o,p)=>(c(),z("div",Ie,[l("ul",He,[(c(),z(S,null,xe(u,i=>l("li",{key:i,class:"col-auto pb-1 pb-lg-2 pl-1 pl-lg-2"},[l("button",{type:"button",class:E(["btn py-1 py-sm-2 px-2 px-md-3 px-lg-4 font-weight-medium rounded-pill",a(e)(i.systemName)?"btn-primary":"btn-outline-primary"]),onClick:s=>a(t).toggleFilter(i.systemName)},[l("i",{class:E([`mi-${i.icon} d-none d-sm-block my-n1 mr-2 mr-lg-3 mi-no-mx icon-filter`])},null,2),l("span",Re,k(i.name),1),l("span",qe,k(i.name),1),a(e)(i.systemName)?(c(),z("i",Ee)):y("",!0)],10,Oe)])),64))])]))}};typeof K=="function"&&K(oe);function Q(r){const n=r;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{cs:{read_less:t=>{const{normalize:e}=t;return e(["číst méně"])},read_more:t=>{const{normalize:e}=t;return e(["Číst více"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Hotovky"])}},sk:{read_less:t=>{const{normalize:e}=t;return e(["čítať menej"])},read_more:t=>{const{normalize:e}=t;return e(["Čítať ďalšie"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Hotovky"])}},pl:{read_less:t=>{const{normalize:e}=t;return e(["zobacz mniej"])},read_more:t=>{const{normalize:e}=t;return e(["Przeczytaj więcej"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Gotowe produkty"])}},hu:{read_less:t=>{const{normalize:e}=t;return e(["kevesebbet mutat"])},read_more:t=>{const{normalize:e}=t;return e(["Továbbolvasom"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Késztermékek"])}},de:{read_less:t=>{const{normalize:e}=t;return e(["weniger lesen"])},read_more:t=>{const{normalize:e}=t;return e(["Mehr lesen"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Fertig-Mixit"])}},at:{read_less:t=>{const{normalize:e}=t;return e(["weniger lesen"])},read_more:t=>{const{normalize:e}=t;return e(["Mehr lesen"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Fertig-Mixit"])}},ro:{read_less:t=>{const{normalize:e}=t;return e(["mai puțin"])},read_more:t=>{const{normalize:e}=t;return e(["mai mult"])},ready_mixes:t=>{const{normalize:e}=t;return e(["Gata preparate"])}}}})}const We={class:"row mb-1 mb-md-2 mb-lg-3 mb-xl-4 justify-between items-center"},Ge={key:0,class:"col-12 mb-n3 pt-0 pt-sm-3"},Ze={class:"col pt-3"},Ue={key:0,class:"h2 mb-0"},Ke=l("h1",{class:"pl-5 pr-5 mx-0 my-5"},null,-1),Qe=["innerHTML"],Je={key:3,class:"d-sm-none d-block"},Xe={class:"text-sm mt-1"},Ye=["innerHTML"],et={class:"text-sm mt-1"},tt=["innerHTML"],nt={class:"d-flex col-auto pt-3 items-center justify-lg-end order-1 order-sm-0 fav-hero"},ot={class:"d-flex bg-light rounded-pill"},re={__name:"ProductsHeader",props:{category:{type:Object,required:!0}},setup(r){const n=r,{t}=N(),e=f(!1),u=f([{name:t("ready_mixes"),link:"/products"}]),o=f(!1),p=()=>{location.href.includes("filter")&&(e.value=!0)},i=()=>{if(n.category&&n.category.description&&n.category.description.length>64){let s=Ne(n.category.description).slice(0,64);return s=s.slice(0,Math.max(0,s.lastIndexOf(" "))),s}};return Me(()=>{p()}),(s,v)=>(c(),z(S,null,[l("header",We,[a(Y).isDesktop()?(c(),z("div",Ge,[d(je,{"breadcrumb-list":u.value},null,8,["breadcrumb-list"])])):y("",!0),l("div",Ze,[r.category?(c(),z("h1",Ue,k(r.category.title),1)):(c(),L(Z,{key:1,class:"rounded-pill pb-md-1",style:{"max-width":"200px","min-height":"30px"}},{default:h(()=>[Ke]),_:1})),r.category?(c(),z("p",{key:2,class:"d-none d-sm-block",innerHTML:r.category.description},null,8,Qe)):y("",!0),r.category?(c(),z("div",Je,[W(d(Ce,null,{default:h(()=>[l("div",Xe,[l("span",{innerHTML:r.category.description},null,8,Ye),l("span",{class:"underline",onClick:v[0]||(v[0]=b=>o.value=!o.value)},k(a(t)("read_less")),1)])]),_:1},512),[[G,o.value]]),W(l("div",et,[l("span",{innerHTML:i()},null,8,tt),te("... "),l("span",{class:"underline",onClick:v[1]||(v[1]=b=>o.value=!o.value)},k(a(t)("read_more")),1)],512),[[G,!o.value]])])):y("",!0),r.category?y("",!0):(c(),L(Z,{key:4,class:"mt-1 mt-sm-0 pt-sm-4 pb-sm-5 mb-sm-3 rounded",style:{"min-height":"42px"}}))]),l("div",nt,[d(ne),l("div",ot,[Fe(s.$slots,"default")])])]),d(oe)],64))}};typeof Q=="function"&&Q(re);const rt=(r,n)=>{var u;const t=n.map((o,p)=>({id:ze(o.id),name:o.name,favorite:!1,categories:[r.title],labels:o.properties.map(i=>i.name),availability:o.state==="available"?"stock":"supplier",price:O(o.priceWithoutDiscountAndVat),discount:O(o.discount)*-1,list_position:p+1})),e={event:"view_item_list",platform:Y.platform(),ecommerce:{currency:n[0].currencyCode,products:t},_clear:!0};(u=window.dataLayer)==null||u.push(e)};function J(r){const n=r;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{cs:{categories_title:t=>{const{normalize:e}=t;return e(["Nevybrali jste si? Máme toho více!"])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Žádný produkt nevyhovuje zvolené filtraci"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Opravdu si přejete odstranit tento produkt z košíku?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Chcete si počkat?"])}},sk:{categories_title:t=>{const{normalize:e}=t;return e(["Nevybrali ste si? Máme toho viac!"])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Žiadny produkt nevyhovuje zvolenej filtrácii"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Naozaj si želáte odstrániť tento produkt z košíka?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Chcete si počkať?"])}},pl:{categories_title:t=>{const{normalize:e}=t;return e(["Nie wiesz co wybrać? Zobacz więcej!"])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Żaden z produktów nie odpowiada zaznaczonym właściwościom"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Naprawdę chcesz usunąć ten produkt z koszyka?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Chcesz poczekać?"])}},hu:{categories_title:t=>{const{normalize:e}=t;return e(["Nem választottál? Van még több is!"])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["A szűrő beállításainak egyetlen termék sem felel meg"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Biztos el szeretnéd távolítani a terméket a kosárból?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Szeretnél várni?"])}},de:{categories_title:t=>{const{normalize:e}=t;return e(["Noch nicht das Richtige gefunden? Wir haben mehr! "])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Kein Produkt entspricht dem ausgewählten Filter"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Möchtest Du dieses Produkt wirklich aus dem Warenkorb entfernen?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Möchtest Du warten?"])}},at:{categories_title:t=>{const{normalize:e}=t;return e(["Noch nicht das Richtige gefunden? Wir haben mehr! "])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Kein Produkt entspricht dem ausgewählten Filter"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Möchtest Du dieses Produkt wirklich aus dem Warenkorb entfernen?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Möchtest Du warten?"])}},ro:{categories_title:t=>{const{normalize:e}=t;return e(["Nu v-ați hotărât? Avem mai multe!"])},no_product_meets_selected_filtration:t=>{const{normalize:e}=t;return e(["Filtrul utilizat nu a returnat nici un produs"])},remove_item_title:t=>{const{normalize:e}=t;return e(["Chiar dorești să îndepărtezi produsul din coș?"])},watchdog_title:t=>{const{normalize:e}=t;return e(["Dorești să aștepți?"])}}}})}const it={class:"container"},at={key:0,class:"text-center"},st={__name:"index",setup(r){const n=P(()=>F(()=>import("./index-_04Sks9N.js").then(m=>m.V),__vite__mapDeps([0,1,2]))),t=P(()=>F(()=>import("./ModalProductDetail-7PqAGFOd.js"),__vite__mapDeps([3,1,0,2]))),e=P(()=>F(()=>import("./ModalRemoveItem-DbSu_hH3.js"),__vite__mapDeps([4,1,0,2]))),u=P(()=>F(()=>import("./index-_04Sks9N.js").then(m=>m.Z),__vite__mapDeps([0,1,2]))),{t:o}=N(),p=ee(),i=f(!1),s="https://www.mixit.sk/",v=(s.endsWith("/")?s.slice(0,-1):s)+p.path,b=f([]),_=f(),M=f(),g=f(),{setNavbar:j}=pe();j({backgroundColor:"bg-primary-700"}),R({link:[{rel:"canonical",href:v}]});const C=async()=>{i.value=!1;const{data:m}=await ge.get(`products?permalink=${p.params.permalink}`);_.value=m.category,b.value=m.products,M.value=m.category.systemName,g.value=m.category.title,i.value=!0,await rt(m.category,m.products),R({title:_.value.ogTitle||_.value.title,meta:[{property:"og:title",content:_.value.ogTitle||_.value.title},{property:"og:description",content:_.value.ogDescription||_.value.description}]})},w=D(),{filterCount:T,isFavoritesInFilter:ie,getFilters:ae,filters:se}=x(w),le=X(),{getFavoriteProducts:ce}=x(le),me=$(()=>b.value.filter(m=>ce.value.includes(m.id))),ue=$(()=>ie.value?me.value:b.value),_e=$(()=>ve(ae.value,"favorites")),I=$(()=>ue.value.filter(m=>_e.value.every(H=>m.properties.some(de=>de.systemName===H)))),V=Ve("filter");return V.value&&w.setFilter(V.value.split(" ")),B(()=>T.value,()=>{V.value=se.value.join(" ")}),B(()=>p.params.permalink,async()=>{w.clearFilters(),C()},{immediate:!0}),(m,H)=>(c(),z(S,null,[d($e,null,{default:h(()=>[l("div",it,[d(re,{category:_.value??null},null,8,["category"]),d(Pe,{"is-loaded":i.value,products:I.value},null,8,["is-loaded","products"]),i.value&&I.value.length===0?(c(),z("div",at,k(a(o)("no_product_meets_selected_filtration")),1)):y("",!0),i.value?(c(),L(Te,{key:1,title:a(o)("categories_title")},null,8,["title"])):y("",!0)])]),_:1}),d(a(n),{"modal-id":"product-detail-modal"},{default:h(()=>[d(a(t))]),_:1}),d(a(n),{title:a(o)("watchdog_title"),"modal-id":"modal-watchdog"},{default:h(()=>[d(a(u))]),_:1},8,["title"]),d(a(n),{title:a(o)("remove_item_title"),"modal-id":"modal-remove-item"},{default:h(()=>[d(a(e))]),_:1},8,["title"])],64))}};typeof J=="function"&&J(st);export{st as default};