1import{t as q,ab as H,u as M,o as n,c as v,D as e,d as c,C as t,I as s,E as o,B as u,G as h,X as j,ag as D,k as y,H as L,J as $,e as S,v as V,r as z}from"#entry";import{_ as A}from"./DlAUqK2U.js";import{a as E}from"./BL-d6PTP.js";import{V as F}from"./4sjALES4.js";import{c as G,a as P,b as T,e as R,V as J}from"./CrRxQ3mv.js";import{b as x,V as C,a as b}from"./Pmxa2yHu.js";import{V as W}from"./DnpNBLJg.js";import{i as O}from"./FdrGFOJR.js";import{a as k}from"./sZ8qQK6B.js";const U={class:"image-container pa-6"},X={class:"text-caption text-medium-emphasis"},K=["innerHTML"],Q={key:0,class:"price-text"},Y={key:1,class:"price-text"},Z={class:"controls-container"},ee={class:"text-error"},te={__name:"ProductsProductCard",props:{product:{type:Object,required:!0}},setup(l){const i=l,p=q(),{$filters:w}=H(),{locale:m}=M(),d=z(1),_=z(!1),I=V(()=>{if(i.product?.image_url.includes("stand_tabletop_pla")||i.product?.image_url.includes("stand_flat_pla")){let r=m.value.startsWith("el")?i.product.image_url:i.product.image_url.replace("/img/","/compressed_img/");return m.value.startsWith("el")?r:r.replace(".png","-en.png")}return i.product?.image_url}),B=V(()=>{if(i.product.image_url.startsWith("https://s3.butler.gr/landing/compressed_img/products/")&&(i.product.image_url.endsWith(".png")||i.product.image_url.endsWith(".jpg")||i.product.image_url.endsWith(".jpeg")))return i.product.image_url.replace("https://s3.butler.gr/landing/compressed_img/products/","https://s3.butler.gr/landing/compressed_img/products/thumbnails/")}),f=V(()=>i.product.is_available===0);function N(){const r=p.productsCart.findIndex(a=>a.id===i.product.id);r!==-1&&p.productsCart[r]!==void 0?(console.debug(p.productsCart[r].quantity),p.productsCart[r].quantity+=Number(d.value)):p.productsCart.push({id:i.product.id,quantity:Number(d.value)}),p.cartMenu=!0,d.value=1}return(r,a)=>(n(),v(J,{rounded:"xl",elevation:"0",class:S(["product-card bg-grey-lighten-4",{reseller:!!l.product.minimum_price&&!s(p).hide_wholesale_prices}])},{default:e(()=>[c("div",U,[t(F,{"lazy-src":s(B),src:s(I),"max-height":"256",height:"256",width:"256",class:"mx-auto"},null,8,["lazy-src","src"])]),l.product.title!==l.product.name&&!s(m).startsWith("en")?(n(),v(G,{key:0,class:"text-primary text-center py-0"},{default:e(()=>[o(u(l.product.name),1)]),_:1})):h("",!0),t(P,{class:"justify-center text-center pt-0"},{default:e(()=>[o(u(s(m).startsWith("en")?l.product.name:l.product.title),1)]),_:1}),l.product.subtitle&&!s(m).startsWith("en")?(n(),v(T,{key:1,innerHTML:l.product.subtitle},null,8,["innerHTML"])):h("",!0),l.product.subtitle&&s(m).startsWith("en")?(n(),v(T,{key:2,class:"py-2"},{default:e(()=>[c("span",X,[t(x,{size:"10",class:"mr-1",style:{opacity:"0.5"}},{default:e(()=>[...a[6]||(a[6]=[o("fas fa-info-circle",-1)])]),_:1}),o(" "+u(r.$t("products.description_not_available"))+" â ",1),c("a",{class:"text-high-emphasis",style:{cursor:"pointer"},onClick:a[0]||(a[0]=g=>_.value=!s(_))},[o(u(r.$t("products.view_in_greek"))+" ",1),t(x,{size:"10"},{default:e(()=>[o(u(s(_)?"fas fa-chevron-up":"fas fa-chevron-down"),1)]),_:1})])]),t(E,null,{default:e(()=>[j(c("div",{class:"mt-1",innerHTML:l.product.subtitle},null,8,K),[[D,s(_)]])]),_:1})]),_:1})):h("",!0),t(R,{class:"pb-4"},{default:e(()=>[t(W,{fluid:"",class:"py-0 px-6"},{default:e(()=>[t(C,{"no-gutters":""},{default:e(()=>[t(b,{cols:"4",md:"3",lg:"5",class:"d-flex align-center"},{default:e(()=>[l.product.free?(n(),y("h3",Q,u(r.$t("services.orderBtn.free")),1)):(n(),y("h3",Y,u(s(w).price(l.product.price)),1))]),_:1}),t(b,{cols:"8",md:"9",lg:"7"},{default:e(()=>[t(W,null,{default:e(()=>[t(C,null,{default:e(()=>[t(b,{cols:"2",md:"3",lg:"2",class:"pa-0"},{default:e(()=>[t(O,{modelValue:s(d),"onUpdate:modelValue":a[1]||(a[1]=g=>L(d)?d.value=g:null),class:"quantity-field mt-0 pt-0",rounded:"","hide-details":"",density:"compact",type:"number",min:"1",onChange:a[2]||(a[2]=g=>s(d)<1?d.value=1:null),"bg-color":"white",disabled:s(f)},null,8,["modelValue","disabled"])]),_:1}),t(b,{cols:"2",md:"2",lg:"2",class:"pa-0"},{default:e(()=>[c("div",Z,[c("div",null,[t(k,{icon:"",size:"x-small",disabled:s(f),onClick:a[3]||(a[3]=g=>d.value++)},{default:e(()=>[t(x,{size:"x-small"},{default:e(()=>[...a[7]||(a[7]=[o("fas fa-angle-up",-1)])]),_:1})]),_:1},8,["disabled"])]),c("div",null,[t(k,{icon:"",size:"x-small",disabled:s(f),onClick:a[4]||(a[4]=g=>s(d)>1?d.value--:null)},{default:e(()=>[t(x,{size:"x-small"},{default:e(()=>[...a[8]||(a[8]=[o("fas fa-angle-down",-1)])]),_:1})]),_:1},8,["disabled"])])])]),_:1}),t(b,{cols:"8",md:"7",lg:"8",class:"pa-0"},{default:e(()=>[t(k,{rounded:"",variant:"flat",disabled:s(f),block:"",class:"order-btn",size:"40",color:s(f)?"grey":"primary",onClick:a[5]||(a[5]=g=>N())},{default:e(()=>[s(f)?(n(),y($,{key:0},[o(u(r.$t("products.categories.unavailable")),1)],64)):(n(),y($,{key:1},[o(u(r.$t("products.categories.add")),1)],64))]),_:1},8,["disabled","color"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l.product.minimum_price&&!s(p).hide_wholesale_prices?(n(),v(C,{key:0},{default:e(()=>[t(b,{cols:"12"},{default:e(()=>[c("div",null,[o(u(r.$t("products.categories.price"))+" ",1),c("span",ee,u(s(w).price(l.product.minimum_price)),1)])]),_:1})]),_:1})):h("",!0)]),_:1})]),_:1})]),_:1},8,["class"]))}},ce=A(te,[["__scopeId","data-v-d924af53"]]);export{ce as _};
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.