import{F as x,ax as S,m as d,P as l,_ as r,W as f,e as t,R as m,a1 as y,X as c,T as u,a0 as V}from"./vendor-BmRNukEL.js";import"./index-CfcNWeCf.js";import{u as b,P as w}from"./useCheckout-C2Ize5U7.js";import{_ as C}from"./payment-processing-cyber-source.vue_vue_type_script_setup_true_lang-X5A9HWjZ.js";import{O as N}from"./order-summary-DjBk5793.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-CnREyPzE.js";import"./address-type.enum-CGCAFS3X.js";import"./index-B2olPSXy.js";import"./useSaveForLater-bd-ar1_n.js";import"./useSkyflowCards-DC_SpPzs.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=d(()=>n.value.inPayments[0]),$=d(()=>i.value?.paymentMethod?.paymentMethodType),s=d(()=>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:y(()=>[c(t(N),{cart:t(n),"no-shipping":t(_)},null,8,["cart","no-shipping"])]),default:y(()=>[c(k,{size:"lg"},{"default-container":y(()=>[u("div",L,[u("div",O,[c(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-Bk5L5p8p.js.map
