import{F as x,ax as S,P as l,_ as r,W as f,e as t,R as m,a1 as d,X as y,T as u,m as c,a0 as V}from"./vendor-D8NNcBCx.js";import"./index-ID5VX6TZ.js";import{u as b,P as w}from"./useCheckout-BQiuPsi0.js";import{_ as C}from"./payment-processing-cyber-source.vue_vue_type_script_setup_true_lang-Ck9WwNo7.js";import{O as N}from"./order-summary-BtlnZ6Hr.js";import{_ as F,a as R,b as T,c as z}from"./payment-processing-authorize-net.vue_vue_type_script_setup_true_lang-CJoR-bQd.js";import"./address-type.enum-CGCAFS3X.js";import"./index-Ci9Q1-By.js";import"./useSaveForLater-DWQgy-P3.js";import"./useSkyflowCards-CKrJLt-A.js";const L={class:"flex flex-row items-center justify-between space-x-3 p-4 shadow-lg md:p-6"},O={class:"min-w-0 truncate"},h={class:"p-5 md:p-6"},H=x({__name:"payment",setup(A){const v=S(),{placedOrder:n,allOrderItemsAreDigital:_}=b(),i=c(()=>n.value.inPayments[0]),$=c(()=>i.value?.paymentMethod?.paymentMethodType),s=c(()=>i.value?.paymentMethod?.typeName);async function o(p){await v.replace({name:"CheckoutPaymentResult",params:{status:p?"success":"failure"}})}return(p,e)=>{const g=l("VcImage"),P=l("ExtensionPointList"),k=l("VcWidget"),M=l("VcLayout");return t(n)?(m(),r(M,{key:0,"sidebar-position":"right",sticky:""},{sidebar:d(()=>[y(t(N),{cart:t(n),"no-shipping":t(_)},null,8,["cart","no-shipping"])]),default:d(()=>[y(k,{size:"lg"},{"default-container":d(()=>[u("div",L,[u("div",O,[y(g,{src:i.value?.paymentMethod?.logoUrl,class:"mr-3.5 inline-block size-8 object-center md:size-9",lazy:""},null,8,["src"]),u("span",null,V(i.value?.paymentMethod?.name),1)])]),u("div",h,[$.value===t(w).Redirection?(m(),r(t(F),{key:0,order:t(n)},null,8,["order"])):s.value==="AuthorizeNetPaymentMethod"?(m(),r(R,{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(T,{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(C,{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==="DatatransPaymentMethod"?(m(),r(z,{key:4,order:t(n),onSuccess:e[6]||(e[6]=a=>o(!0)),onFail:e[7]||(e[7]=a=>o(!1))},null,8,["order"])):s.value&&p.$canRenderExtensionPoint("paymentPage","payment-methods",{order:t(n),paymentTypeName:s.value})?(m(),r(P,{key:5,category:"paymentPage",order:t(n),"payment-type-name":s.value,onSuccess:e[8]||(e[8]=a=>o(!0)),onFail:e[9]||(e[9]=a=>o(!1))},null,8,["order","payment-type-name"])):f("",!0)])]),_:1})]),_:1})):f("",!0)}}});export{H as default};
//# sourceMappingURL=payment-DGMXfY-6.js.map
