import{Component}from"@theme/component";class VolumePricingInfoComponent extends Component{connectedCallback(){super.connectedCallback();const anchoredPopover=this.closest("anchored-popover-component");if(anchoredPopover instanceof Component&&anchoredPopover.isConnected)try{anchoredPopover.updatedCallback()}catch{Promise.resolve().then(()=>{if(anchoredPopover.isConnected)try{anchoredPopover.updatedCallback()}catch{}})}}updatedCallback(){super.updatedCallback();const anchoredPopover=this.closest("anchored-popover-component");anchoredPopover instanceof Component&&anchoredPopover.updatedCallback()}updateActiveTier(quantity){const anchoredPopover=this.closest("anchored-popover-component"),rows=(anchoredPopover instanceof Component?anchoredPopover.refs?.popover:null)?.querySelectorAll(".volume-pricing-info__row[data-quantity]");if(!rows)return;let activeTier=null;for(const row of rows)row.classList.remove("volume-pricing-info__row--active"),row instanceof HTMLElement&&quantity>=parseInt(row.dataset.quantity||"0")&&(activeTier=row);activeTier?.classList.add("volume-pricing-info__row--active")}}customElements.get("volume-pricing-info")||customElements.define("volume-pricing-info",VolumePricingInfoComponent);
//# sourceMappingURL=/s/files/1/0677/1399/0759/t/1/assets/volume-pricing-info.js.map?v=1783078800
