import{v as f}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{_ as d}from"./OrderFormList.vue_vue_type_style_index_0_lang-D2j7UvcI.js";import{u as h}from"./settingsStore-8bwiLMEn.js";import{e as b,k as v,d as w}from"./fieldsStore-CQRN0FvQ.js";import{d as P,e as o,K as k,a as _,b as g,B as A,t as B,k as C,i as E}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as F}from"./vendor-vue-reactivity-CheHbvBM.js";import"./vendor-vue-shared-DrzsEcag.js";import"./appStore-CFAkQG2b.js";import"./vendor-pinia-BSPefQhS.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./Button.vue_vue_type_style_index_0_lang-CxqKrtR4.js";import"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import"./RequiredHint.vue_vue_type_style_index_0_lang-DGTCbwUk.js";import"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";import"./widget-BSjzAbGy.js";import"./appearanceStore-Cp-euDX2.js";import"./translationsStore-D6vLzgNA.js";import"./pageBreakerStore-BevSHYnU.js";import"./vendor-vueform-slider-CCH9_7pb.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const ot=P({__name:"PurchaseButtonAlias",props:{showSummary:{type:Boolean},item:{}},setup(a){const r=h(),s=b(),i=v(),u=w(),p=a,m=o(()=>{var t;return(t=r.getFormSettings)==null?void 0:t.accessEmail}),c=o(()=>{var t,e;return!!((e=(t=r.getFormSettings)==null?void 0:t.summaryDisplay)!=null&&e.enable)}),l=o(()=>m.value?c.value?!0:p.showSummary:!1),S=o(()=>{var e;const t=r.getFormSettings;return(t==null?void 0:t.payment)&&((e=t==null?void 0:t.paymentMethods)==null?void 0:e.length)});k(()=>{m.value&&S.value&&s.setIsPaymentAfterSubmit(!0)});const y=o(()=>s.isPaymentAfterSubmit&&s.getSubmit),n=()=>{i.updatePaymentType("woocommerce"),u.submissionCreateOrder()};return _(()=>{window.addEventListener("ccbWooCheckout",n)}),g(()=>{window.removeEventListener("ccbWooCheckout",n)}),(t,e)=>l.value?A((E(),C(F(d),{key:0,class:"ccb-total-summary-action",options:t.item.options},null,8,["options"])),[[f,!y.value]]):B("",!0)}});export{ot as default};
//# sourceMappingURL=PurchaseButtonAlias-Dc9oE2lc.js.map
