import{F as S,aw as V,m as d,P as i,_ as r,W as v,e as t,R as m,a1 as y,X as c,T as u,a0 as w}from"./vendor-BeMjADS_.js";import"./index-Bf5vN7WQ.js";import{u as x,P as b}from"./useCheckout-7y4nce05.js";import{O as C}from"./order-summary-CDvePD3k.js";import{_ as N,a as F,b as R,c as T,d as z}from"./payment-processing-cyber-source.vue_vue_type_style_index_0_lang-aoiZXV4p.js";import"./address-type.enum-CGCAFS3X.js";import"./useSaveForLater-CgFI3ESe.js";import"./index-BAmO-sMo.js";import"./useSkyflowCards-CGjgBFCO.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"},G=S({__name:"payment",setup(A){const f=V(),{placedOrder:n,allOrderItemsAreDigital:$}=x(),l=d(()=>n.value.inPayments[0]),g=d(()=>l.value?.paymentMethod?.paymentMethodType),s=d(()=>l.value?.paymentMethod?.typeName);async function o(p){await f.replace({name:"CheckoutPaymentResult",params:{status:p?"success":"failure"}})}return(p,e)=>{const P=i("VcImage"),_=i("ExtensionPointList"),k=i("VcWidget"),M=i("VcLayout");return t(n)?(m(),r(M,{key:0,"sidebar-position":"right",sticky:""},{sidebar:y(()=>[c(t(C),{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(P,{src:l.value?.paymentMethod?.logoUrl,class:"mr-3.5 inline-block size-8 object-center md:size-9",lazy:""},null,8,["src"]),u("span",null,w(l.value?.paymentMethod?.name),1)])]),u("div",h,[g.value===t(b).Redirection?(m(),r(t(N),{key:0,order:t(n)},null,8,["order"])):s.value==="AuthorizeNetPaymentMethod"?(m(),r(F,{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(T,{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(_,{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"])):v("",!0)])]),_:1})]),_:1})):v("",!0)}}});export{G as default};
//# sourceMappingURL=payment-BTyqP9_Q.js.map
