import{r as e,h as s,F as t,H as a,g as r}from"./p-dfbe004d.js";import{_ as o}from"./p-8415f806.js";import"./p-fd56940f.js";import{a as l}from"./p-10aa7556.js";import"./p-699b9e85.js";import{s as i,g as c,h as n,a as p,b as m}from"./p-a41f5fb3.js";import{s as d}from"./p-ea78c070.js";import{M as u}from"./p-61b0c4ec.js";import"./p-9a7a47e8.js";import"./p-35c4916d.js";import"./p-1c2e2695.js";import"./p-6c2a2148.js";const y=class{constructor(s){e(this,s)}componentWillLoad(){i.disabled.processors=this.disabledProcessorTypes}renderStripe(e){return s("sc-payment-method-choice",{key:null==e?void 0:e.id,"processor-id":"stripe",card:this.stripePaymentElement},s("span",{slot:"summary",class:"sc-payment-toggle-summary"},s("sc-icon",{name:"credit-card",style:{fontSize:"24px"}}),s("span",null,o("Credit Card","surecart"))),s("div",{class:"sc-payment__stripe-card-element"},s("slot",{name:"stripe"})))}renderPayPal(e){const a=c("stripe");return s(t,null,s("sc-payment-method-choice",{key:null==e?void 0:e.id,"processor-id":"paypal"},s("span",{slot:"summary",class:"sc-payment-toggle-summary"},s("sc-icon",{name:"paypal",style:{width:"80px",fontSize:"24px"}})),s("sc-card",null,s("sc-payment-selected",{label:o("PayPal selected for check out.","surecart")},s("sc-icon",{slot:"icon",name:"paypal",style:{width:"80px"}}),o("Another step will appear after submitting your order to complete your purchase details.","surecart")))),!a&&s("sc-payment-method-choice",{key:null==e?void 0:e.id,"processor-id":"paypal","method-id":"card"},s("span",{slot:"summary",class:"sc-payment-toggle-summary"},s("sc-icon",{name:"credit-card",style:{fontSize:"24px"}}),s("span",null,o("Credit Card","surecart"))),s("sc-card",null,s("sc-payment-selected",{label:o("Credit Card selected for check out.","surecart")},s("sc-icon",{name:"credit-card",slot:"icon",style:{fontSize:"24px"}}),o("Another step will appear after submitting your order to complete your purchase details.","surecart")))))}render(){var e,t,r;if(!1===(null===(e=l.checkout)||void 0===e?void 0:e.payment_method_required))return null;const i=n()||"paypal"===(null==d?void 0:d.id)?"sc-toggles":"div",y=c("mollie");return s(a,null,s("sc-form-control",{label:this.label,exportparts:"label, help-text, form-control"},s("div",{class:"sc-payment-label",slot:"label"},s("div",null,this.label),"test"===l.mode&&!this.hideTestModeBadge&&s("sc-tag",{type:"warning",size:"small",exportparts:"base:test-badge__base, content:test-badge__content"},o("Test Mode","surecart"))),(null==y?void 0:y.id)?s("sc-checkout-mollie-payment",{"processor-id":null==y?void 0:y.id}):s(i,{collapsible:!1,theme:"container"},!(null===(t=p())||void 0===t?void 0:t.length)&&!(null===(r=m())||void 0===r?void 0:r.length)&&s("sc-alert",{type:"info",open:!0},o("You do not have any processors enabled for this mode and cart. Please configure your processors.","surecart")),(p()||[]).map((e=>{switch(null==e?void 0:e.processor_type){case"stripe":return this.renderStripe(e);case"paypal":return this.renderPayPal(e)}})),s(u,{methods:m()}))))}get el(){return r(this)}};y.style=":host{display:flex !important;flex-direction:column;gap:var(--sc-input-label-margin);position:relative;font-family:var(--sc-font-sans)}.sc-payment-toggle-summary{line-height:1;display:flex;align-items:center;gap:0.5em;font-weight:var(--sc-font-weight-semibold)}.sc-payment-label{display:flex;justify-content:space-between}.sc-payment-instructions{color:var(--sc-color-gray-600);font-size:var(--sc-font-size-small);line-height:var(--sc-line-height-dense)}.sc-payment__stripe-card-element{display:flex !important;flex-direction:column;gap:var(--sc-input-label-margin);position:relative}";export{y as sc_payment}