import{r as s,h as t}from"./p-dfbe004d.js";import{_ as o}from"./p-8415f806.js";import"./p-fd56940f.js";import{i}from"./p-e05449ea.js";import{a as r}from"./p-1c2e2695.js";import"./p-9a7a47e8.js";const a=class{constructor(t){s(this,t),this.busy=!1}async handleSubmit(s){const{ad_hoc_amount:t}=await s.target.getFormJson();return this.busy=!0,window.location.assign(r(window.location.href,{action:"confirm",ad_hoc_amount:t}))}render(){return t("sc-dashboard-module",{heading:this.heading||o("Enter An Amount","surecart"),class:"subscription-switch"},t("sc-card",null,t("sc-form",{onScSubmit:s=>this.handleSubmit(s)},t("sc-price-input",{label:"Amount",name:"ad_hoc_amount",autofocus:!0,required:!0},t("span",{slot:"suffix",style:{opacity:"0.75"}},i(this.price))),t("sc-button",{type:"primary",full:!0,submit:!0,loading:this.busy},o("Next","surecart")," ",t("sc-icon",{name:"arrow-right",slot:"suffix"})))),this.busy&&t("sc-block-ui",{style:{zIndex:"9"}}))}};a.style=":host{display:block}";export{a as sc_subscription_ad_hoc_confirm}