import{r as t,h as i,H as o}from"./p-e97fde0a.js";import{s as r,g as d}from"./p-7f01a36e.js";import{a as c}from"./p-0b0c03f7.js";const e=":host{border-style:none}.product-img{max-width:100%;aspect-ratio:var(--sc-product-image-aspect-ratio);padding-top:var(--sc-product-image-padding-top, 0);padding-bottom:var(--sc-product-image-padding-bottom, 0);padding-left:var(--sc-product-image-padding-left, 0);padding-right:var(--sc-product-image-padding-right, 0);margin-top:var(--sc-product-image-margin-top, 0);margin-bottom:var(--sc-product-image-margin-bottom, 0);margin-left:var(--sc-product-image-margin-left, 0);margin-right:var(--sc-product-image-margin-right, 0);border:solid var(--sc-product-image-border-width) var(--sc-product-image-border-color);border-radius:var(--sc-product-image-border-radius);overflow:hidden}.product-img>img{width:100%;height:100%;box-sizing:border-box;object-fit:contain;display:block;transition:transform var(--sc-transition-medium) ease}.product-img.is_covered>img{object-fit:cover}.product-img.is_contained>img{object-fit:contain}.product-img_placeholder{width:100%;height:100%;background-color:var(--sc-color-gray-300)}.product-img:hover img{transform:scale(1.05)}";const a=e;const s=class{constructor(i){t(this,i);this.product=undefined;this.sizing=undefined}getSrc(){var t,i,o,d,e,a,s,n,p,l,u;if((i=(t=this.product)===null||t===void 0?void 0:t.featured_product_media)===null||i===void 0?void 0:i.url){return(d=(o=this.product)===null||o===void 0?void 0:o.featured_product_media)===null||d===void 0?void 0:d.url}if((s=(a=(e=this.product)===null||e===void 0?void 0:e.featured_product_media)===null||a===void 0?void 0:a.media)===null||s===void 0?void 0:s.url){return r((l=(p=(n=this.product)===null||n===void 0?void 0:n.featured_product_media)===null||p===void 0?void 0:p.media)===null||l===void 0?void 0:l.url,c("surecart/product-list/media/size",900))}return`${(u=window.scData)===null||u===void 0?void 0:u.plugin_url}/images/placeholder.jpg`}render(){const{alt:t,title:r}=d(this.product);return i(o,{key:"775c243aedfbb0c60ee3b52d1b4d40aab264b833",style:{borderStyle:"none"}},i("div",{key:"4c704759ca73f506555aa5a611ba1dc1ddd5aeb7",class:{"product-img":true,is_contained:this.sizing==="contain",is_covered:this.sizing==="cover"}},!!this.getSrc()?i("img",{src:this.getSrc(),alt:t,...r?{title:r}:{}}):i("div",{class:"product-img_placeholder"})))}};s.style=a;const n=":host{display:block;line-height:1}.product-price{padding-top:var(--sc-product-price-padding-top, 0);padding-bottom:var(--sc-product-price-padding-bottom, 0);padding-left:var(--sc-product-price-padding-left, 0);padding-right:var(--sc-product-price-padding-right, 0);margin-top:var(--sc-product-price-margin-top, 0);margin-bottom:var(--sc-product-price-margin-bottom, 0);margin-left:var(--sc-product-price-margin-left, 0);margin-right:var(--sc-product-price-margin-right, 0);text-align:var(--sc-product-price-align);font-size:var(--sc-product-price-font-size);font-weight:var(--sc-product-price-font-weight);color:var(--sc-product-price-text-color)}";const p=n;const l=class{constructor(i){t(this,i);this.prices=undefined;this.range=true;this.metrics=undefined}componentWillLoad(){var t,i,o,r,d,c;if(this.range&&((t=this.metrics)===null||t===void 0?void 0:t.min_price_amount)!==((i=this.metrics)===null||i===void 0?void 0:i.max_price_amount)){this.prices=[{amount:(o=this.metrics)===null||o===void 0?void 0:o.min_price_amount,currency:(r=this.metrics)===null||r===void 0?void 0:r.currency},{amount:(d=this.metrics)===null||d===void 0?void 0:d.max_price_amount,currency:(c=this.metrics)===null||c===void 0?void 0:c.currency}]}}render(){var t;const o=(this.prices||[]).sort(((t,i)=>(t===null||t===void 0?void 0:t.position)-(i===null||i===void 0?void 0:i.position))).find((t=>!(t===null||t===void 0?void 0:t.archived)));return i("div",{key:"0a0c25c85be003208ae05d90861b813bb7eb140c",class:"product-price",part:"base"},!this.range&&((t=this.prices)===null||t===void 0?void 0:t.length)?i("sc-format-number",{type:"currency",currency:(o===null||o===void 0?void 0:o.currency)||"usd",value:o===null||o===void 0?void 0:o.amount}):i("sc-price-range",{prices:this.prices}))}};l.style=p;const u=".product-item-title{padding-top:var(--sc-product-title-padding-top, 0);padding-bottom:var(--sc-product-title-padding-bottom, 0);margin-top:var(--sc-product-title-margin-top, 0);margin-bottom:var(--sc-product-title-margin-bottom, 0);font-size:var(--sc-product-title-font-size);text-align:var(--sc-product-title-align);font-weight:var(--sc-product-title-font-weight);color:var(--sc-product-title-text-color);line-height:1.2}";const g=u;const v=class{constructor(i){t(this,i)}render(){return i(o,{key:"f4284ebdca4dbc6b7cbdd5f1bd3b53462992ded6"},i("div",{key:"da25e8ea0cee8a860ecc84caa8412449c4a49e55",class:{"product-item-title":true}},i("slot",{key:"69aea2dc4562e2d963eb083607bde273d404967a"})))}};v.style=g;export{s as sc_product_item_image,l as sc_product_item_price,v as sc_product_item_title};
//# sourceMappingURL=p-bf749728.entry.js.map