import{r as c,h as a}from"./p-9add63ef.js";import{i as e}from"./p-610295e2.js";import{a as t}from"./p-401e165e.js";import"./p-3f6362a4.js";const s=":host{display:block}";const i=s;const o=class{constructor(a){c(this,a);this.heading=undefined;this.price=undefined;this.currencyCode=undefined;this.busy=false}async handleSubmit(c){const{ad_hoc_amount:a}=await c.target.getFormJson();this.busy=true;return window.location.assign(t(window.location.href,{action:"confirm",ad_hoc_amount:a}))}render(){return a("sc-dashboard-module",{key:"da83e00c7cd3bf2ee128f8a93a4529c055492c25",heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},a("sc-card",{key:"5bebb597b231cfb2902b414cc85e6d5ac10d37bf"},a("sc-form",{key:"7fcc7104b0df71156d9b2e154098e4619cf0d39d",onScSubmit:c=>this.handleSubmit(c)},a("sc-price-input",{key:"0a9ac97efa255d8ab6f3ad05343814681a63a4d5",label:"Amount",name:"ad_hoc_amount",currencyCode:this.currencyCode,autofocus:true,required:true},a("span",{key:"f6508d8acb67b8a76d3c472194eb51cb3a816618",slot:"suffix",style:{opacity:"0.75"}},e(this.price))),a("sc-button",{key:"1aca8cefb2c5bb70455fba2d7c196760be563c6e",type:"primary",full:true,submit:true,loading:this.busy},wp.i18n.__("Next","surecart")," ",a("sc-icon",{key:"f1f747f9b880d98cc95692d7cc6a659d6e3422c9",name:"arrow-right",slot:"suffix"})))),this.busy&&a("sc-block-ui",{key:"469340f496da0a5bb3cdfad2678cc4a0885b0a0a",style:{zIndex:"9"}}))}};o.style=i;export{o as sc_subscription_ad_hoc_confirm};
//# sourceMappingURL=p-18c0547b.entry.js.map