import{a as v,C as S,k as i,o as h,m as b,g,p as e,M as m,ac as C,u as r,Z as x,N as k}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{r as w}from"./card_payment-wDsgHahi.js";import{u as I}from"./useSinglePayment-DcJMpQlI.js";import{h as B,a as D}from"./widget-BUAABBRb.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./translationsStore-DBJu9sBR.js";const R={class:"ccb-payment"},z={class:"ccb-payment-header"},E={class:"ccb-payment-header__label"},N=["name"],P={class:"calc-payment_header__img"},V=["src"],L={class:"ccb-payment-body"},T=v({__name:"Stripe",props:{name:{}},setup(d){const u=d,{name:_}=S(u),s=B(),f=D(),{paymentType:a}=I(),y=i(!1),c=i(null),p=i(null);return h(async()=>{var t,o;const l=f.getStripeData;if(await s.initializeStripe(l),y.value=!0,s.stripeInstance){p.value=(t=s.stripeInstance)==null?void 0:t.elements();const n=(o=p.value)==null?void 0:o.create("card");n==null||n.mount(c.value),s.setCardComponent(n)}}),(l,t)=>(g(),b("div",R,[e("label",null,[e("div",z,[e("div",E,[m(e("input",{type:"radio",name:r(_),value:"stripe","onUpdate:modelValue":t[0]||(t[0]=o=>x(a)?a.value=o:null)},null,8,N),[[C,r(a)]]),t[1]||(t[1]=e("span",{class:"ccb-radio-label"},"Stripe",-1))]),e("div",P,[e("img",{src:r(w),alt:"card-payment-image",style:{"max-width":"112px"}},null,8,V)])]),m(e("div",L,[e("div",{ref_key:"cardComponent",ref:c},null,512)],512),[[k,r(a)==="stripe"]])])]))}}),J=M(T,[["__scopeId","data-v-b243017a"]]);export{J as default};
//# sourceMappingURL=Stripe-D-yUQWF8.js.map
