import{r as e,h as c}from"./p-e97fde0a.js";import{i as t}from"./p-4df6e0c5.js";import{a as s}from"./p-401e165e.js";import"./p-3f6362a4.js";const a=":host{display:block}";const d=a;const i=class{constructor(c){e(this,c);this.heading=undefined;this.price=undefined;this.currencyCode=undefined;this.busy=false}async handleSubmit(e){const{ad_hoc_amount:c}=await e.target.getFormJson();this.busy=true;return window.location.assign(s(window.location.href,{action:"confirm",ad_hoc_amount:c}))}render(){return c("sc-dashboard-module",{key:"bb5940347cf9480364b5d0bd80242a334e4ce048",heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},c("sc-card",{key:"42657c15f23c9c79c6f28c177bd5401fd1bedd3d"},c("sc-form",{key:"2e418bd74140bcfcedabe937fd265d8b4e81d1d6",onScSubmit:e=>this.handleSubmit(e)},c("sc-price-input",{key:"a596b7ba0df54ae44365c7f3a94e5d4ec6c146e7",label:"Amount",name:"ad_hoc_amount",currencyCode:this.currencyCode,autofocus:true,required:true},c("span",{key:"0295dedc9b7b170c2f168c487f67f5ca8e039e1f",slot:"suffix",style:{opacity:"0.75"}},t(this.price))),c("sc-button",{key:"dcf0b3f2f6f5ee815213998df57bb9acf11e128f",type:"primary",full:true,submit:true,loading:this.busy},wp.i18n.__("Next","surecart")," ",c("sc-icon",{key:"b34ea76f75d72695ccbe8bdebb00e14f8585b104",name:"arrow-right",slot:"suffix"})))),this.busy&&c("sc-block-ui",{key:"0210ee58c7683a7246412c6318c12b9b69d0ad4e",style:{zIndex:"9"}}))}};i.style=d;export{i as sc_subscription_ad_hoc_confirm};
//# sourceMappingURL=p-7ef3d567.entry.js.map