import{s as N}from"./striptags-BpeLwlJ7.js";import{P as L,y as $,D as x,a5 as H,i as I,I as V,A,M as F,o as r,e as i,f as n,g as c,v as m,k as v,l as p,C as g,t as a,m as s,F as Z,B as E,J as R,r as W}from"./vendor-CI5NvTnj.js";import{u as J,g as U,B as K,n as b,i as q,w as O,A as G}from"./index-BRMV7KFd.js";import Q from"./ButtonState-CyOwBnne.js";import X from"./ButtonPlayVideo-B5Mt6R4e.js";import Y from"./ButtonFavorite-C2GbfENc.js";import ee from"./BaseDiscountBubble-CWBuz4Zd.js";import{_ as te}from"./BaseTransitionCollapse-BsjcCcd6.js";import{_ as oe}from"./ProductNutritionTable-CeguWiTo.js";import{g as ne}from"./propertiesSvgs-DIjf9FvC.js";function M(o){const d=o;d.__i18n=d.__i18n||[],d.__i18n.push({locale:"",resource:{cs:{composition:e=>{const{normalize:t}=e;return t(["SloĹľenĂ"])},mix_me:e=>{const{normalize:t}=e;return t(["Namixuj si mÄ›"])},play_video:e=>{const{normalize:t}=e;return t(["ShlĂ©dnout video"])},read_less:e=>{const{normalize:t}=e;return t(["ÄŤĂst mĂ©nÄ›"])},read_more:e=>{const{normalize:t}=e;return t(["ÄŚĂst vĂce"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Jsem u ledu! Z dĹŻvodu vysokĂ˝ch teplot mÄ› poslali do chládku."])},want_to_see:e=>{const{normalize:t}=e;return t(["Chci se kouknout"])}},sk:{composition:e=>{const{normalize:t}=e;return t(["ZloĹľenie"])},mix_me:e=>{const{normalize:t}=e;return t(["Namixuj si ma"])},play_video:e=>{const{normalize:t}=e;return t(["PozrieĹĄ video"])},read_less:e=>{const{normalize:t}=e;return t(["ÄŤĂtaĹĄ menej"])},read_more:e=>{const{normalize:t}=e;return t(["ÄŚĂtaĹĄ ÄŹalšie"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Som v chládku! :( ÄŚokoláda má kvĂ´li vysokĂ˝m teplotám dovolenku."])},want_to_see:e=>{const{normalize:t}=e;return t(["Chcem sa pozrieĹĄ"])}},pl:{composition:e=>{const{normalize:t}=e;return t(["SkĹ‚ad"])},mix_me:e=>{const{normalize:t}=e;return t(["Namixuj"])},play_video:e=>{const{normalize:t}=e;return t(["Zobacz wideo"])},read_less:e=>{const{normalize:t}=e;return t(["zobacz mniej"])},read_more:e=>{const{normalize:t}=e;return t(["Przeczytaj wiÄ™cej"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Czekam w chĹ‚odzie! :( Ze wzglÄ™du na upaĹ‚y, czekolada zostaĹ‚a wysĹ‚ana na przymusowy urlop."])},want_to_see:e=>{const{normalize:t}=e;return t(["ChcÄ™ zobaczyć"])}},hu:{composition:e=>{const{normalize:t}=e;return t(["Ă–sszetevĹ‘k"])},mix_me:e=>{const{normalize:t}=e;return t(["Keverj össze"])},play_video:e=>{const{normalize:t}=e;return t(["NĂ©zd meg a videĂłt"])},read_less:e=>{const{normalize:t}=e;return t(["kevesebbet mutat"])},read_more:e=>{const{normalize:t}=e;return t(["Továbbolvasom"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Hidegre helyezve! :( A magas hĹ‘mĂ©rsĂ©kletek miatt a csokoládĂ©s termĂ©kek szabadságon vannak."])},want_to_see:e=>{const{normalize:t}=e;return t(["MegnĂ©zem"])}},de:{composition:e=>{const{normalize:t}=e;return t(["Zutaten"])},mix_me:e=>{const{normalize:t}=e;return t(["Mix mich"])},play_video:e=>{const{normalize:t}=e;return t(["Video ansehen"])},read_less:e=>{const{normalize:t}=e;return t(["weniger lesen"])},read_more:e=>{const{normalize:t}=e;return t(["Mehr lesen"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Ich liege auf Eis! :( Wegen der hohen Temperaturen haben sie mich in die Kältekammer geschickt."])},want_to_see:e=>{const{normalize:t}=e;return t(["Jetzt entdecken!"])}},at:{composition:e=>{const{normalize:t}=e;return t(["Zutaten"])},mix_me:e=>{const{normalize:t}=e;return t(["Mix mich"])},play_video:e=>{const{normalize:t}=e;return t(["Video ansehen"])},read_less:e=>{const{normalize:t}=e;return t(["weniger lesen"])},read_more:e=>{const{normalize:t}=e;return t(["Mehr lesen"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["Ich liege auf Eis! :( Wegen der hohen Temperaturen haben sie mich in die Kältekammer geschickt."])},want_to_see:e=>{const{normalize:t}=e;return t(["Jetzt entdecken!"])}},ro:{composition:e=>{const{normalize:t}=e;return t(["Ingrediente"])},mix_me:e=>{const{normalize:t}=e;return t(["AmestecÄ-mÄ"])},play_video:e=>{const{normalize:t}=e;return t(["UrmÄreČ™te clipul"])},read_less:e=>{const{normalize:t}=e;return t(["mai puČ›in"])},read_more:e=>{const{normalize:t}=e;return t(["mai mult"])},selected_chocolate_products:e=>{const{normalize:t}=e;return t(["La rece! :( Din cauza temperaturilor Ă®nalte produsele cu ciocolatÄ sunt Ă®n concediu."])},want_to_see:e=>{const{normalize:t}=e;return t(["Vreau sÄ vÄd"])}}}})}const re={class:"product-item relative d-flex flex-col flex-grow-1 p-4 p-sm-3 p-md-4"},ie={class:"catalog__grid-img mb-4"},ae=["src"],se={class:"mb-2 text-lg font-weight-medium font-family-base"},le={class:"product-item__description collapse d-md-block text-sm text-muted show"},ce={key:0,class:"text-info"},me=["innerHTML"],de={key:0,class:"d-md-none relative zindex-2 text-sm text-muted"},ue=["innerHTML"],_e=n("br",null,null,-1),pe=["innerHTML"],ze=n("br",null,null,-1),he={class:"product-item__more text-sm text-muted mb-2"},ve={class:"form-row mt-auto"},ge={class:"col-7 col-lg-6 d-flex flex-col justify-center pt-2"},fe={class:"mb-0 d-flex text-lg"},ke={class:"text-nowrap mr-2 mr-sm-1 mr-md-2 mr-xl-3 mr-xxl-4"},xe={class:"text-nowrap text-muted"},ye={class:"mb-0 d-flex text-lg"},we={key:0,class:"line-through text-danger text-nowrap mr-2 mr-sm-1 mr-md-2 mr-xl-3 mr-xxl-4"},be={key:0,class:"small mb-0 text-muted"},Me={class:"col-5 col-lg-6 d-flex flex-col justify-center pt-2"},Te={class:"d-inline px-4"},Pe={class:"col-12 pt-3 pt-xl-4"},De={class:"form-row list-unstyled mt-n1"},Ce={class:"stretched-link"},je={id:"btn-close",class:"col-auto pt-1 ml-auto d-none d-md-block"},Se=n("i",{class:"mi-info icon-14px"},null,-1),Be=[Se],Ne={key:2,class:"absolute position-top position-right fav-right"},Le={__name:"LandingPageGridProduct",props:{product:{type:Object,required:!0},isRetro:{type:Boolean,default:!1}},setup(o){const d=L(),{t:e}=$(),t=o,y=x(""),u=x(!1),f=x(0),k=H({name:"productPath",params:{permalink:t.product.permalink}}),{openModal:T}=J(),P=I(()=>t.product?t.product.properties.filter(l=>l.propertyType==="marketing"):[]);V(()=>{C()});const D=async l=>{const{data:{product:_}}=await G.get(`products/${l}`);T({id:"product-detail-modal",title:_.name,params:{product:_}})},C=()=>{y.value=N(t.product.description).slice(0,180)},j=l=>{l.preventDefault(),window.innerWidth<768?u.value=!u.value:d.push(k)},S=()=>{f.value=document.documentElement.scrollTop;const l=document.querySelector("#js-navbar");l&&(f.value-=l.offsetHeight+10),window.scrollTo({top:f.value,behavior:"smooth"})};return(l,_)=>{var w;const z=A("router-link"),B=F("tooltip");return r(),i("article",re,[n("div",ie,[o.product.images.length>0?(r(),c(U,{key:0,"product-image-data":(w=o.product.images[0])==null?void 0:w.data,"img-class":"w-100 h-100",alt:o.product.name,sizes:"(min-width: 1200px) 25vw, (min-width: 992px) 20vw, (min-width: 600px) 35vw, (min-width: 500px) 50vw, 70vw"},null,8,["product-image-data","alt"])):(r(),i("img",{key:1,src:o.product.imageUrl,class:"w-100 h-100"},null,8,ae))]),o.product.hasDiscount?(r(),c(ee,{key:0,"price-with-discount":parseFloat(o.product.price),"price-without-discount":parseFloat(o.product.priceWithoutDiscount),currency:o.product.currency},null,8,["price-with-discount","price-without-discount","currency"])):m("",!0),n("h2",se,[v(z,{to:k,class:"stretched-link text-primary no-decoration"},{default:p(()=>[g(a(o.product.name),1)]),_:1},8,["to"])]),n("div",le,[o.product.state==="weather_too_hot"?(r(),i("span",ce,a(s(e)("selected_chocolate_products"))+" ",1)):m("",!0),u.value?m("",!0):(r(),i("span",{key:1,innerHTML:y.value},null,8,me))]),v(te,{onAfterEnter:S},{default:p(()=>[u.value?(r(),i("div",de,[n("div",{innerHTML:o.product.description},null,8,ue),_e,n("strong",null,a(s(e)("composition"))+":",1),n("div",{innerHTML:o.product.composition},null,8,pe),ze,v(oe,{product:o.product},null,8,["product"])])):m("",!0)]),_:1}),n("p",he,[g(" ... "),s(K).isMobile()?(r(),i("span",{key:0,class:"stretched-link",onClick:j},a(u.value?s(e)("read_less"):s(e)("read_more")),1)):(r(),c(z,{key:1,to:k},{default:p(()=>[g(a(s(e)("read_more")),1)]),_:1},8,["to"]))]),n("footer",ve,[n("div",ge,[n("p",fe,[n("strong",ke,a(s(b)(o.product.price,o.product.currency)),1),n("span",xe,a(o.product.weight)+" g",1)]),n("p",ye,[o.product.hasDiscount?(r(),i("strong",we,a(s(b)(o.product.priceWithoutDiscount,o.product.currency)),1)):m("",!0)]),o.product.pricePerPortion?(r(),i("p",be," ("+a(parseFloat(o.product.pricePerPortion).toFixed(2))+" "+a(o.product.currency)+" / 100 g) ",1)):m("",!0)]),n("div",Me,[!o.product.isIngredient&&o.product.state==="available"?(r(),c(q,{key:0,product:o.product},null,8,["product"])):o.product.isIngredient&&o.product.state==="available"?(r(),c(z,{key:1,to:{name:"productPath",params:{permalink:o.product.permalink}},class:"btn btn-gradient btn-success py-3 px-2 p-sm-2 font-weight-medium stretched-link rounded-pill"},{default:p(()=>[g(a(s(e)("want_to_see")),1)]),_:1},8,["to"])):o.product.state==="hidden"&&o.isRetro?(r(),c(z,{key:2,to:{name:"mixesPath",params:{permalink:s(O)("path.own_musli")}},class:"btn btn-gradient btn-retro-2 py-3 px-2 p-sm-2 font-weight-medium zindex-1 text-white rounded-pill"},{default:p(()=>[n("span",Te,a(s(e)("mix_me")),1)]),_:1},8,["to"])):(r(),c(Q,{key:3,product:o.product,state:o.product.state},null,8,["product","state"]))]),n("div",Pe,[n("ul",De,[(r(!0),i(Z,null,E(P.value,h=>(r(),i("li",{key:h.id,class:"col-auto pt-1"},[R((r(),i("div",Ce,[(r(),c(W(s(ne)(h.systemName)),{class:"icon",width:"30",height:"30"}))])),[[B,{content:h.name,theme:"baseTooltip"}]])]))),128)),n("li",je,[n("button",{type:"button",class:"btn btn-outline-warning p-1 stretched-link rounded-circle","data-toggle":"product-detail-modal","aria-label":"product info",onClick:_[0]||(_[0]=h=>D(o.product.permalink))},Be)])])])]),o.product.videoUrl?(r(),c(X,{key:1,class:"absolute position-left position-top m-2 m-md-3 m-lg-4","video-url":o.product.videoUrl},null,8,["video-url"])):m("",!0),o.product.isIngredient?m("",!0):(r(),i("div",Ne,[v(Y,{id:o.product.id,"btn-class":"stretched-link bg-white"},null,8,["id"])]))])}}};typeof M=="function"&&M(Le);export{Le as _};