import{r as s,h as t,F as i}from"./p-e97fde0a.js";import{s as a,e as p,h as e,b as r}from"./p-863940e9.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=".sc-product-pills-variant-option__wrapper{display:flex;flex-wrap:wrap;gap:var(--sc-spacing-x-small)}";const c=o;const l=class{constructor(t){s(this,t);this.label=undefined;this.optionNumber=1;this.productId=undefined}render(){return t("sc-form-control",{key:"f1c78f2082f946c68b432c063907082cbe22d69f",label:this.label},t("span",{key:"fddfbc7e181a541a90384c5795be4244c21d21c7",slot:"label"},this.label),t("div",{key:"572ea81173ead6249640aa77a833cfc81290f257",class:"sc-product-pills-variant-option__wrapper"},(a[this.productId].variant_options[this.optionNumber-1].values||[]).map((s=>{const o=p(this.productId,this.optionNumber,s)||e(this.productId,this.optionNumber,s);return t("sc-pill-option",{isUnavailable:o,isSelected:a[this.productId].variantValues[`option_${this.optionNumber}`]===s,onClick:()=>r(this.productId,{variantValues:{...a[this.productId].variantValues,[`option_${this.optionNumber}`]:s}})},t("span",{"aria-hidden":"true"},s),t("sc-visually-hidden",null,wp.i18n.sprintf(wp.i18n.__("Select %s: %s.","surecart"),this.label,s),o&&t(i,null," ",wp.i18n.__("(option unavailable)","surecart")),a[this.productId].variantValues[`option_${this.optionNumber}`]===s&&t(i,null," ",wp.i18n.__("This option is currently selected.","surecart"))))}))))}};l.style=c;export{l as sc_product_pills_variant_option};
//# sourceMappingURL=p-e4d8fba7.entry.js.map