import{r as t,h as s,H as i,a as o}from"./p-9add63ef.js";import"./p-15daaf77.js";import{s as l}from"./p-71d77b7d.js";import{s as n}from"./p-78468e45.js";import{i as a,c as e}from"./p-38b12af4.js";import{a as u}from"./p-0d4dd694.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-07a2074d.js";import"./p-3f6362a4.js";import"./p-ec182234.js";import"./p-fb28f84f.js";import"./p-8dccb656.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:"c1306c0a36e0ca4c9cf76f9b8417c82392dd1e69",class:{"is-busy":p(),"is-disabled":l.disabled,"is-sold-out":a(this.getUpsellProductId())&&!e(this.getUpsellProductId())||(n===null||n===void 0?void 0:n.code)==="out_of_stock","is-unavailable":e(this.getUpsellProductId())||(n===null||n===void 0?void 0:n.code)==="expired"},onClick:t=>this.handleAddToOrderClick(t)},s("slot",{key:"a311418425c1786ed6e87fc0388bdb59c8d4182f"}))}get el(){return o(this)}};r.style=c;export{r as sc_upsell_submit_button};
//# sourceMappingURL=p-b2823d4f.entry.js.map