import{r as t,h as i,H as s}from"./p-e97fde0a.js";import{s as e,b as d}from"./p-7d44e2d5.js";import{g as a}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 o=":host{display:block}";const n=o;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,o,n,l,h,r,p;const c=a((t=e[this.productId])===null||t===void 0?void 0:t.product,(o=e[this.productId])===null||o===void 0?void 0:o.selectedVariant);return i(s,{key:"d7b8eaa6f51daae0171e41153ad652b56761756a"},i("sc-form-control",{key:"2a36b259b7c8c97dc53f92a1d78fda3fd90a6a3f",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:"46b47dabcfc1bfe15adfe10516c386f816e16a22",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-ec186b32.entry.js.map