import{r as s,h as t,F as i}from"./p-9add63ef.js";import{s as a,e,h as p,b as r}from"./p-38b12af4.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 o=".sc-product-pills-variant-option__wrapper{display:flex;flex-wrap:wrap;gap:var(--sc-spacing-x-small)}";const l=o;const n=class{constructor(t){s(this,t);this.label=undefined;this.optionNumber=1;this.productId=undefined}render(){return t("sc-form-control",{key:"125baefe2b88d9c2eea35b13d59b3c6412f4af3e",label:this.label},t("span",{key:"0e08d93c8aae556bad0ae36a538b7b93a1439966",slot:"label"},this.label),t("div",{key:"891fc231b975e294870ce1296b788e55dfffdf21",class:"sc-product-pills-variant-option__wrapper"},(a[this.productId].variant_options[this.optionNumber-1].values||[]).map((s=>{const o=e(this.productId,this.optionNumber,s)||p(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"))))}))))}};n.style=l;export{n as sc_product_pills_variant_option};
//# sourceMappingURL=p-a3ba7b70.entry.js.map