import{r as s,h as t,F as i}from"./p-b891c2f1.js";import{o as r}from"./p-494248b1.js";import{g as o}from"./p-29ce32f3.js";const e=class{constructor(t){s(this,t),this.type="primary",this.size="medium",this.full=!0,this.mode="live",this.currencyCode="usd"}renderPayPalButton(s){const{client_id:i,account_id:r}=o(this.processors,"paypal",this.mode);return i||r?t("sc-paypal-buttons",{buttons:s,busy:this.busy,mode:this.mode,order:this.order,"currency-code":this.currencyCode,"client-id":i,"merchant-id":r,label:"checkout",color:"blue"}):null}render(){return t(i,null,"paypal"===this.processor&&this.renderPayPalButton(["paypal"]),"paypal-card"===this.processor&&this.renderPayPalButton(["card"]),t("sc-button",{hidden:"stripe"!==this.processor,submit:!0,type:this.type,size:this.size,full:this.full,loading:this.loading||this.paying,disabled:this.loading||this.paying||this.busy},!!this.icon&&t("sc-icon",{name:this.icon,slot:"prefix"}),t("slot",null),this.showTotal&&t("span",null," ",t("sc-total",null))))}};r(e,["busy","loading","paying","processors","processor","mode","currencyCode","order"],!1),e.style="sc-order-submit{display:block;width:auto}";export{e as sc_order_submit}