import{F as S,aw as V,m as d,P as l,_ as r,W as v,e as t,R as m,a1 as y,X as c,T as u,a0 as b}from"./vendor-DYYUXsKb.js";import"./index-BjgfEvRF.js";import{u as w,P as x}from"./useCheckout-07KxsLTC.js";import{O as C}from"./order-summary-BYk5d0To.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-BVTVopDL.js";/* empty css                                                                     */import"./address-type.enum-CGCAFS3X.js";import"./useSaveForLater-C5rBLxnB.js";/* empty css                                                                      */import"./index-CkxY7VIr.js";import"./useSkyflowCards-B24RbzIn.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"},J=S({__name:"payment",setup(A){const f=V(),{placedOrder:n,allOrderItemsAreDigital:$}=w(),i=d(()=>n.value.inPayments[0]),g=d(()=>i.value?.paymentMethod?.paymentMethodType),s=d(()=>i.value?.paymentMethod?.typeName);async function o(p){await f.replace({name:"CheckoutPaymentResult",params:{status:p?"success":"failure"}})}return(p,e)=>{const P=l("VcImage"),_=l("ExtensionPointList"),k=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(k,{size:"lg"},{"default-container":y(()=>[u("div",L,[u("div",O,[c(P,{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,b(i.value?.paymentMethod?.name),1)])]),u("div",h,[g.value===t(x).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{J as default};
//# sourceMappingURL=payment-v3qQTGzX.js.map
