import{r as e,h as c}from"./p-e97fde0a.js";import{i as a}from"./p-4df6e0c5.js";import{a as t}from"./p-401e165e.js";import"./p-3f6362a4.js";const s=":host{display:block}";const o=s;const i=class{constructor(c){e(this,c);this.heading=undefined;this.price=undefined;this.busy=false}async handleSubmit(e){const{ad_hoc_amount:c}=await e.target.getFormJson();this.busy=true;return window.location.assign(t(window.location.href,{action:"confirm",ad_hoc_amount:c}))}render(){return c("sc-dashboard-module",{key:"450b43a56ed13e55be235ce595a0c37910c4f271",heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},c("sc-card",{key:"20da7c86030bc61f579793d7bd50f4c7a0279dde"},c("sc-form",{key:"452af4e15286f2bc762231a83a61cc403e041489",onScSubmit:e=>this.handleSubmit(e)},c("sc-price-input",{key:"c47e270663f11f837741f30f91bf58ac5fbc7ce1",label:"Amount",name:"ad_hoc_amount",autofocus:true,required:true},c("span",{key:"3548ca68906a2a1fd07eacfcf614bcb1909a7290",slot:"suffix",style:{opacity:"0.75"}},a(this.price))),c("sc-button",{key:"8dff737f24e608dea10e2929b9bbd4b36738da75",type:"primary",full:true,submit:true,loading:this.busy},wp.i18n.__("Next","surecart")," ",c("sc-icon",{key:"84cb7c105c518e6ec64a0bbb8ed6ab8a5ddf9274",name:"arrow-right",slot:"suffix"})))),this.busy&&c("sc-block-ui",{key:"e54c74a6e24feb59e11be0b025c19cffa946ac73",style:{zIndex:"9"}}))}};i.style=o;export{i as sc_subscription_ad_hoc_confirm};
//# sourceMappingURL=p-cb25c427.entry.js.map