import S from"./CTAcmMAz.js";import T from"./a5umXhxZ.js";import{Y as z,y as L,i as N,j as i,w as V,k as e,l as r,p as t,t as p,m,A as u,v as $,_ as j}from"./BCLrUOBx.js";import{u as D}from"./Di7fl9dA.js";import{u as H}from"./BnLnKt_p.js";import{u as I}from"./Ce8lFovl.js";import"./Bxmfm8sn.js";const R={class:"item-inner"},U={class:"img-container"},A={class:"img-wrapper"},E={class:"title-wrap"},M={class:"ellipsis ellipsis-1 mb-5"},O={class:"pos-rel flex start"},Y={key:0,class:"strike-through"},q={class:"f-12"},F={key:0,class:"discount ml-10"},G=["title"],et={__name:"SearchedProductTile",props:{product:{type:Object,default(){return null}}},emits:["removed"],setup(_,{emit:d}){const h=_,{product:s}=z(h),f=d,{prevPrice:c,currentPricing:g,reducedPercent:n}=D({product:s}),{getThumbImageURL:k,productLink:v}=L(),{addToCompare:a}=H({product:s,emit:f}),y=I(),{setProduct:b}=y,x=()=>{b(s.value)};return(P,o)=>{const w=S,l=T,C=j;return i(),N(C,{to:t(v)(t(s)),class:"page-link center-text item",onClick:x},{default:V(()=>[e("div",R,[e("div",U,[e("div",A,[r(w,{"lazy-src":t(k)(t(s).image),title:t(s).title,alt:t(s).title,height:"50",width:"50"},null,8,["lazy-src","title","alt"])])]),e("div",E,[e("h5",M,p(t(s).title),1),e("div",O,[e("h5",null,[t(c)?(i(),m("span",Y,[r(l,{price:t(c)},null,8,["price"])])):u("",!0),e("span",q,[r(l,{price:t(g)},null,8,["price"])])]),t(n)?(i(),m("span",F," -"+p(t(n))+"% ",1)):u("",!0),e("button",{"aria-label":"submit",class:"compare-btn",title:P.$t("product.compare"),onClick:o[0]||(o[0]=$((...B)=>t(a)&&t(a)(...B),["prevent"]))},o[1]||(o[1]=[e("i",{class:"icon reload-icon"},null,-1)]),8,G)])])])]),_:1},8,["to"])}}};export{et as default};
