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-b3860daf.js";import"./p-2b28ea49.js";import"./p-13f5e4e1.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:"670f43991a65026e8294cc31bcb66533d7b50162",label:this.label},t("span",{key:"d88e48856e7f8c7ee6590e1d36f49fab23c7759e",slot:"label"},this.label),t("div",{key:"4a3b0ff68ca59aa6dd6f4d19a194268bcaad925e",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-4f2eec5f.entry.js.map