import{r as e,h as t}from"./p-9add63ef.js";import{i as a}from"./p-610295e2.js";import{a as s}from"./p-401e165e.js";import"./p-3f6362a4.js";const c=":host{display:block}";const i=c;const o=class{constructor(t){e(this,t);this.heading=undefined;this.price=undefined;this.currencyCode=undefined;this.busy=false}async handleSubmit(e){const{ad_hoc_amount:t}=await e.target.getFormJson();this.busy=true;return window.location.assign(s(window.location.href,{action:"confirm",ad_hoc_amount:t}))}render(){return t("sc-dashboard-module",{key:"4a35e1114f863dfc79fa4694e2941a594535af36",heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},t("sc-card",{key:"77414bee1502459d44fd69e40bf4524118717396"},t("sc-form",{key:"9519d021e34e84d91d02c26351d5f6a55a69be0d",onScSubmit:e=>this.handleSubmit(e)},t("sc-price-input",{key:"9bec5ccec951d14d53e886e2c138b0ba72ab455e",label:"Amount",name:"ad_hoc_amount",currencyCode:this.currencyCode,autofocus:true,required:true},t("span",{key:"58ab6d75deaa8c9d38564938f6403b48f1479580",slot:"suffix",style:{opacity:"0.75"}},a(this.price))),t("sc-button",{key:"cbc32465ecb3991997344b9e36c05a0f0a0f1e3e",type:"primary",full:true,submit:true,loading:this.busy},wp.i18n.__("Next","surecart")," ",t("sc-icon",{key:"5506388e1ebab66cea771c15a1efdb061a1629bf",name:"arrow-right",slot:"suffix"})))),this.busy&&t("sc-block-ui",{key:"34b2fbbd163b67f8bdbea04ab9a210486ecbc386",style:{zIndex:"9"}}))}};o.style=i;export{o as sc_subscription_ad_hoc_confirm};
//# sourceMappingURL=p-65ef4e7e.entry.js.map