import{r as t,h as s,H as i,a as o}from"./p-9add63ef.js";import"./p-338ab6f8.js";import{s as l}from"./p-71d77b7d.js";import{s as a}from"./p-78468e45.js";import{i as n,c as e}from"./p-b3860daf.js";import{a as u}from"./p-efa47a7e.js";import{a as p}from"./p-1365bb41.js";import"./p-401e165e.js";import"./p-dd24e53c.js";import"./p-2b28ea49.js";import"./p-830ab1a3.js";import"./p-13f5e4e1.js";import"./p-3f6362a4.js";import"./p-ec182234.js";import"./p-fb28f84f.js";import"./p-445fd8b4.js";import"./p-259c3935.js";import"./p-d3366af3.js";const b="sc-upsell-submit-button{position:relative;display:block}sc-upsell-submit-button .wp-block-button__link{position:relative;text-decoration:none}sc-upsell-submit-button .wp-block-button__link span sc-icon{padding-right:var(--sc-spacing-small)}sc-upsell-submit-button .wp-block-button__link [data-text],sc-upsell-submit-button .wp-block-button__link sc-spinner{display:flex;align-items:center;justify-content:center}sc-upsell-submit-button .sc-block-button--sold-out,sc-upsell-submit-button .sc-block-button--unavailable{display:none !important}sc-upsell-submit-button.is-unavailable .sc-block-button__link{display:none !important}sc-upsell-submit-button.is-unavailable .sc-block-button--unavailable{display:initial !important}sc-upsell-submit-button.is-sold-out .sc-block-button__link{display:none !important}sc-upsell-submit-button.is-sold-out .sc-block-button--sold-out{display:initial !important}sc-upsell-submit-button sc-spinner::part(base){--indicator-color:currentColor;--spinner-size:12px;position:absolute;top:calc(50% - var(--spinner-size) + var(--spinner-size) / 4);left:calc(50% - var(--spinner-size) + var(--spinner-size) / 4)}sc-upsell-submit-button [data-text],sc-upsell-submit-button [data-loader]{transition:opacity var(--sc-transition-fast) ease-in-out, visibility var(--sc-transition-fast) ease-in-out}sc-upsell-submit-button [data-loader]{opacity:0;visibility:hidden}sc-upsell-submit-button.is-disabled{pointer-events:none}sc-upsell-submit-button.is-busy [data-text]{opacity:0;visibility:hidden}sc-upsell-submit-button.is-busy [data-loader]{opacity:1;visibility:visible}sc-upsell-submit-button.is-out-of-stock [data-text]{opacity:0.6}";const c=b;const r=class{constructor(s){t(this,s)}getUpsellProductId(){var t;return((t=l.product)===null||t===void 0?void 0:t.id)||""}async handleAddToOrderClick(t){t.preventDefault();u()}render(){return s(i,{key:"312c13a59cb9d6debf1965dcfc3cae8be4143ae9",class:{"is-busy":p(),"is-disabled":l.disabled,"is-sold-out":n(this.getUpsellProductId())&&!e(this.getUpsellProductId())||(a===null||a===void 0?void 0:a.code)==="out_of_stock","is-unavailable":e(this.getUpsellProductId())||(a===null||a===void 0?void 0:a.code)==="expired"},onClick:t=>this.handleAddToOrderClick(t)},s("slot",{key:"993f199a226383fcde5f2bd67077c0b302d6c759"}))}get el(){return o(this)}};r.style=c;export{r as sc_upsell_submit_button};
//# sourceMappingURL=p-91f9f239.entry.js.map