import{r as t,h as i,H as s}from"./p-9add63ef.js";import{s as e,b as d}from"./p-38b12af4.js";import{g as o}from"./p-2da8d1fe.js";import"./p-2b28ea49.js";import"./p-07a2074d.js";import"./p-3f6362a4.js";import"./p-ec182234.js";import"./p-dd24e53c.js";import"./p-fb28f84f.js";import"./p-830ab1a3.js";const a=":host{display:block}";const n=a;let l=0;const h=class{constructor(i){t(this,i);this.inputId=`sc-quantity-${++l}`;this.helpId=`sc-quantity-help-text-${l}`;this.labelId=`sc-quantity-label-${l}`;this.size="medium";this.name=undefined;this.errors=undefined;this.showLabel=true;this.label=undefined;this.required=false;this.help=undefined;this.productId=undefined}render(){var t,a,n,l,h,r,p;const c=o((t=e[this.productId])===null||t===void 0?void 0:t.product,(a=e[this.productId])===null||a===void 0?void 0:a.selectedVariant);return i(s,{key:"ff2a3774633b638c6b7403ba90521e336b9fac81"},i("sc-form-control",{key:"383769eb55826dbacda14146846f338de6a0ce12",exportparts:"label, help-text, form-control",size:this.size,required:this.required,label:this.label,showLabel:this.showLabel,help:this.help,inputId:this.inputId,helpId:this.helpId,labelId:this.labelId,name:this.name},i("sc-quantity-select",{key:"04d4cc59b21b59ae57839d7aa025f6d4b86349c9",size:this.size,quantity:Math.max(((l=(n=e[this.productId])===null||n===void 0?void 0:n.selectedPrice)===null||l===void 0?void 0:l.ad_hoc)?1:(h=e[this.productId])===null||h===void 0?void 0:h.quantity,1),disabled:(p=(r=e[this.productId])===null||r===void 0?void 0:r.selectedPrice)===null||p===void 0?void 0:p.ad_hoc,onScInput:t=>d(this.productId,{quantity:t.detail}),...!!c?{max:c}:{}})))}};h.style=n;export{h as sc_product_quantity};
//# sourceMappingURL=p-c2024e3a.entry.js.map