import{F as S,aw as V,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 w}from"./vendor-Dd8T34zR.js";import"./index-Vd7lvnU9.js";import{u as x,P as b}from"./useCheckout-OiXWgHHw.js";import{_ as C}from"./payment-processing-cyber-source.vue_vue_type_script_setup_true_lang-CH4D4GZy.js";import{O as N}from"./order-summary--jJnDZhb.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-CLDXTYxV.js";import"./address-type.enum-CGCAFS3X.js";import"./index-lPdE7Uwg.js";import"./useSaveForLater-ewBJ_bZr.js";import"./useSkyflowCards-d6VHAP7O.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=S({__name:"payment",setup(A){const v=V(),{placedOrder:n,allOrderItemsAreDigital:_}=x(),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,w(i.value?.paymentMethod?.name),1)])]),u("div",h,[$.value===t(b).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-Cb3ABegS.js.map
