import{r as t,h as i,H as s}from"./p-e97fde0a.js";import{s as e,b as o}from"./p-863940e9.js";import{g as d}from"./p-1b470883.js";import"./p-03631502.js";import"./p-13f5e4e1.js";import"./p-3f6362a4.js";import"./p-ec182234.js";import"./p-9dbc54d6.js";import"./p-93127aa7.js";import"./p-830ab1a3.js";const n=":host{display:block}";const a=n;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,n,a,l,h,c,r;const p=d((t=e[this.productId])===null||t===void 0?void 0:t.product,(n=e[this.productId])===null||n===void 0?void 0:n.selectedVariant);return i(s,{key:"7b87526bd90a8b4f6ee834d72766dbc0e55c4bb7"},i("sc-form-control",{key:"33a4c42bec936fb50eb137fbd0cfc74a96c228c6",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:"c77ece0b9c6bed4c3eb21750d1b0e0e77cd97921",size:this.size,quantity:Math.max(((l=(a=e[this.productId])===null||a===void 0?void 0:a.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:(r=(c=e[this.productId])===null||c===void 0?void 0:c.selectedPrice)===null||r===void 0?void 0:r.ad_hoc,onScInput:t=>o(this.productId,{quantity:t.detail}),...!!p?{max:p}:{}})))}};h.style=a;export{h as sc_product_quantity};
//# sourceMappingURL=p-46246cc8.entry.js.map