import{F as V,aw as b,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 p,a0 as w}from"./vendor-d3O24IFR.js";import"./index-D7CvLAM9.js";import{u as x,P as S}from"./useCheckout-OF31JPhR.js";import{O as C}from"./order-summary-Bu2mMn14.js";import{_ as N,a as h,b as R,c as T}from"./payment-processing-cyber-source.vue_vue_type_style_index_0_lang-D7oa-Hdc.js";import"./address-type.enum-CGCAFS3X.js";/* empty css                                                         *//* empty css                                                                      */import"./index-Bnw0vLdY.js";import"./useSkyflowCards-Dn3QjDdg.js";const z={class:"flex flex-row items-center justify-between space-x-3 p-4 shadow-lg md:p-6"},F={class:"min-w-0 truncate"},L={class:"p-5 md:p-6"},G=V({__name:"payment",setup(O){const v=b(),{placedOrder:n,allOrderItemsAreDigital:_}=x(),i=d(()=>n.value.inPayments[0]),g=d(()=>i.value?.paymentMethod?.paymentMethodType),s=d(()=>i.value?.paymentMethod?.typeName);async function o(u){await v.replace({name:"CheckoutPaymentResult",params:{status:u?"success":"failure"}})}return(u,e)=>{const P=l("VcImage"),k=l("ExtensionPointList"),$=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($,{size:"lg"},{"default-container":y(()=>[p("div",z,[p("div",F,[c(P,{src:i.value?.paymentMethod?.logoUrl,class:"mr-3.5 inline-block size-8 object-center md:size-9",lazy:""},null,8,["src"]),p("span",null,w(i.value?.paymentMethod?.name),1)])]),p("div",L,[g.value===t(S).Redirection?(m(),r(t(N),{key:0,order:t(n)},null,8,["order"])):s.value==="AuthorizeNetPaymentMethod"?(m(),r(h,{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&&u.$canRenderExtensionPoint("paymentPage","payment-methods",{order:t(n),paymentTypeName:s.value})?(m(),r(k,{key:4,category:"paymentPage",order:t(n),"payment-type-name":s.value,onSuccess:e[6]||(e[6]=a=>o(!0)),onFail:e[7]||(e[7]=a=>o(!1))},null,8,["order","payment-type-name"])):f("",!0)])]),_:1})]),_:1})):f("",!0)}}});export{G as default};
//# sourceMappingURL=payment-4zKtO6fo.js.map
