1import h from"./AdvancedPicture-B_3rBqFI.js";import{u as b}from"./useHoliday-RidSVV7F.js";import{u as P}from"./useDevice-Bk5XUS65.js";import{Y as w,A as a,C as s,R as o,B as n,K as C,H as D,Q as d,W as k,G as _,u as I,x as N,c as u,D as r}from"./inertia-prototypes-_0KFShPv.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./isSymbol-DvzfyB44.js";const V=["href"],x={class:"image-set-height-con"},z={key:0,class:"action-sticker"},B={class:"percent"},E={class:"sub-text"},L={key:0,class:"short_product_description"},S={class:"description"},T={class:"delivery-desc"},A={class:"cta-container"},H=["href"],M={key:0,class:"price"},O={key:1,class:"price sale"},Y={class:"from"},q={class:"for"},F={__name:"ProductCard",props:{product:{required:!0},collectionId:{required:!0},isLazy:{type:Boolean,default:!0},fetchPriority:{type:String,default:"auto",validator:e=>["auto","high","low"].includes(e)}},setup(e){const c=e,i=N().appContext.config.globalProperties,{holiday:f}=b(),{staticDevice:m}=P(),y=JSON.parse(window.hol.fastShopProductCollections),v=u(()=>c.product.images.length>1&&m.isDesktop),g=u(()=>{const{deliveryDays:t}=c.product;return y.includes(c.collectionId)?i.trans("shop.label.dynamic-delivery.full-message").replace("{delivery_days}",t):parseInt(t,10)>1?i.trans("shop.label.prod-delivery").replace("{delivery_days}",t):i.trans("shop.label.prod-delivery-one")}),p=u(()=>{var t;return(((t=c.product)==null?void 0:t.title)||"").replace(/ |\u00A0/g," ")});return(t,G)=>{const l=w("dompurify-html");return r(),a("article",{class:_(["product",I(f)])},[s("a",{href:e.product.href},[s("div",x,[e.product.lowestPrice.discount!==0?(r(),a("div",z,[s("span",B,o(e.product.lowestPrice.discount)+"%",1),s("span",E,o(t.trans("shop.label.sale")),1)])):n("",!0),C(h,{ref:"imageEl",files:e.product.images[0],"is-lazy":e.isLazy,"fetch-priority":e.fetchPriority,"alt-text":p.value},null,8,["files","is-lazy","fetch-priority","alt-text"]),v.value?(r(),D(h,{key:1,ref:"imageEl",class:"hover-image",files:e.product.images[1],"is-lazy":!0,"fetch-priority":"low","alt-text":p.value},null,8,["files","alt-text"])):n("",!0)]),d(s("h3",null,null,512),[[l,e.product.title]]),c.collectionId===6&&e.product.short_product_description!==null?d((r(),a("div",L,null,512)),[[l,e.product.short_product_description??""]]):n("",!0)],8,V),s("div",S,[d(s("p",T,null,512),[[l,g.value]])]),s("div",A,[s("a",{href:e.product.href,class:"btn-next cta-btn"},o(t.trans("shop.button.product-cta")),9,H)]),e.product.lowestPrice.discount===0?(r(),a("p",M,o(e.product.hasMultipleVariants?t.trans("shop.label.price-from"):t.trans("shop.label.price"))+" "+o(e.product.lowestPrice.price),1)):(r(),a("p",O,[k(o(e.product.hasMultipleVariants?t.trans("shop.label.price-from"):t.trans("shop.label.price"))+" ",1),s("span",Y,o(e.product.lowestPrice.normal_price),1),s("span",q,o(e.product.lowestPrice.price),1)]))],2)}}};export{F as default};
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.