import{r as s,c as i,h as e,F as c,a as t}from"./p-9add63ef.js";import{b as o}from"./p-a05701be.js";import{s as r}from"./p-b28405ea.js";import"./p-2b28ea49.js";import"./p-dd24e53c.js";import"./p-d3366af3.js";import"./p-401e165e.js";import"./p-830ab1a3.js";import"./p-ec182234.js";import"./p-3f6362a4.js";import"./p-31faf2b8.js";import"./p-610295e2.js";const a="sc-price-choices{display:block;position:relative}sc-block-ui{z-index:9}";const p=a;const d=class{constructor(e){s(this,e);this.scRemoveLineItem=i(this,"scRemoveLineItem",7);this.scUpdateLineItem=i(this,"scUpdateLineItem",7);this.label=undefined;this.columns=1;this.required=true}handleChange(){this.el.querySelectorAll("sc-price-choice").forEach((s=>{var i;const e=s.querySelector("sc-choice")||s.querySelector("sc-choice-container");if(!(e===null||e===void 0?void 0:e.checked)){this.scRemoveLineItem.emit({price_id:s.priceId,quantity:s.quantity})}else{const c=o((i=r.checkout)===null||i===void 0?void 0:i.line_items,e.value);this.scUpdateLineItem.emit({price_id:s.priceId,quantity:(c===null||c===void 0?void 0:c.quantity)||(s===null||s===void 0?void 0:s.quantity)||1})}}))}render(){return e(c,{key:"0777df0b6cf3730fc7ff8a21d7edb8282695a248"},e("sc-choices",{key:"b7f5c26e41ca1e3c084fc8b6b531923099d00c99",label:this.label,required:this.required,class:"loaded price-selector",style:{"--columns":this.columns.toString()}},e("slot",{key:"eb65ff447fc37c960cb74e92e34c22174707477a"})))}get el(){return t(this)}};d.style=p;export{d as sc_price_choices};
//# sourceMappingURL=p-74f731c7.entry.js.map