import{r as s,h as r,H as e}from"./p-dfbe004d.js";const t=class{constructor(r){s(this,r)}handlePricesChange(){var s;let r,e;null===(s=this.prices)||void 0===s||s.forEach((s=>{(!e||s.amount>e.amount)&&(e=s),(!r||s.amount<r.amount)&&(r=s)})),this.minPrice=r,this.maxPrice=e}componentWillLoad(){this.handlePricesChange()}render(){return this.maxPrice&&this.minPrice?r(e,null,this.maxPrice.amount==this.minPrice.amount?r("span",{class:"price-range-display"},r("sc-format-number",{type:"currency",currency:this.maxPrice.currency,value:this.maxPrice.amount})):r("span",{class:"price-range-display"},r("sc-format-number",{type:"currency",currency:this.minPrice.currency,value:this.minPrice.amount}),"-",r("sc-format-number",{type:"currency",currency:this.maxPrice.currency,value:this.maxPrice.amount}))):r(e,null)}static get watchers(){return{prices:["handlePricesChange"]}}};t.style=":host{display:block}";export{t as sc_price_range}