const __vite__fileDeps=["shared/bchhc/index-BRMV7KFd.js","shared/bchhc/vendor-CI5NvTnj.js","shared/bchhc/index-C6eaw0wS.css","shared/bchhc/ModalProductDetail-lHIuLyrX.js","shared/bchhc/ModalRemoveItem-ByOcqna4.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-BRMV7KFd.js";import{u 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-CI5NvTnj.js";import $e from"./BasePageWrapper-CXSeoIUS.js";import{P as Z,_ as Pe}from"./ProductsCatalogGrid-BnMcf0wU.js";import{s as Ne}from"./striptags-BpeLwlJ7.js";import je from"./BaseBreadcrumb-B6HDJrad.js";import{_ as Ce}from"./BaseTransitionCollapse-BsjcCcd6.js";import Te from"./BaseCategoriesSection-BWgn4y8j.js";import"./propertiesSvgs-DIjf9FvC.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-BRMV7KFd.js").then(m=>m.V),__vite__mapDeps([0,1,2]))),t=P(()=>F(()=>import("./ModalProductDetail-lHIuLyrX.js"),__vite__mapDeps([3,1,0,2]))),e=P(()=>F(()=>import("./ModalRemoveItem-ByOcqna4.js"),__vite__mapDeps([4,1,0,2]))),u=P(()=>F(()=>import("./index-BRMV7KFd.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};