import{M as V,ai as b,E as d,U as l,R as r,a8 as f,e as t,O as m,V as y,X as c,W as p,Y as x}from"./vendor-CsGITfgk.js";import"./index-CsCqMgta.js";import{u as S,P as w}from"./useCheckout-DB1kmMTf.js";import{O as C}from"./order-summary-DAnvItp2.js";import{_ as N,a as h,b as R,c as z}from"./payment-processing-cyber-source.vue_vue_type_style_index_0_lang-D5CisaC5.js";import"./address-type.enum-CGCAFS3X.js";import"./index-CkqanWgz.js";import"./useSkyflowCards-Z-31kXMS.js";const O={class:"flex flex-row items-center justify-between space-x-3 p-4 shadow-lg md:p-6"},T={class:"min-w-0 truncate"},E={class:"p-5 md:p-6"},X=V({__name:"payment",setup(F){const v=b(),{placedOrder:n,allOrderItemsAreDigital:_}=S(),i=d(()=>n.value.inPayments[0]),g=d(()=>i.value?.paymentMethod?.paymentMethodType),s=d(()=>i.value?.paymentMethod?.typeName);async function o(u){await v.replace({name:"CheckoutPaymentResult",params:{status:u?"success":"failure"}})}return(u,e)=>{const k=l("VcImage"),P=l("ExtensionPointList"),$=l("VcWidget"),M=l("VcLayout");return t(n)?(m(),r(M,{key:0,"sidebar-position":"right","sticky-sidebar":""},{sidebar:y(()=>[c(t(C),{cart:t(n),"no-shipping":t(_)},null,8,["cart","no-shipping"])]),default:y(()=>[c($,{size:"lg"},{"default-container":y(()=>[p("div",O,[p("div",T,[c(k,{src:i.value?.paymentMethod?.logoUrl,class:"mr-3.5 inline-block size-8 object-center md:size-9",lazy:""},null,8,["src"]),p("span",null,x(i.value?.paymentMethod?.name),1)])]),p("div",E,[g.value===t(w).Redirection?(m(),r(t(N),{key:0,order:t(n)},null,8,["order"])):s.value==="AuthorizeNetPaymentMethod"?(m(),r(h,{key:1,order:t(n),onSuccess:e[0]||(e[0]=a=>o(!0)),onFail:e[1]||(e[1]=a=>o(!1))},null,8,["order"])):s.value==="SkyflowPaymentMethod"?(m(),r(R,{key:2,order:t(n),onSuccess:e[2]||(e[2]=a=>o(!0)),onFail:e[3]||(e[3]=a=>o(!1))},null,8,["order"])):s.value==="CyberSourcePaymentMethod"?(m(),r(z,{key:3,order:t(n),onSuccess:e[4]||(e[4]=a=>o(!0)),onFail:e[5]||(e[5]=a=>o(!1))},null,8,["order"])):s.value&&u.$canRenderExtensionPoint("paymentPage","payment-methods",{order:t(n),paymentTypeName:s.value})?(m(),r(P,{key:4,category:"paymentPage",order:t(n),"payment-type-name":s.value,onSuccess:e[6]||(e[6]=a=>o(!0)),onFail:e[7]||(e[7]=a=>o(!1))},null,8,["order","payment-type-name"])):f("",!0)])]),_:1})]),_:1})):f("",!0)}}});export{X as default};
//# sourceMappingURL=payment-BkEHQ4gS.js.map
