import{d as h}from"./vendor-pinia-BSPefQhS.js";import{c as r}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";const f=h("settings_store",{state:()=>({general:null,layout:null,currency:null,thankYouPage:null,stickyCalc:null,formFields:null,warningTexts:null,emailOptions:[],wooProducts:null,wooCheckout:null,paymentGateway:null,pageBreaker:null,notice:null,invoice:null,recaptcha:null,geolocation:null,editCalcButton:null,pdfSettings:null,quoteSettings:null,termsAndConditionsTrigger:!1,summaryDisplayShowSummary:!1,language:""}),getters:{getPdfSettings:e=>e.pdfSettings,getQuoteSettings:e=>e.quoteSettings,getPageBreakerSettings:e=>e.pageBreaker,getGeneralSettings:e=>e.general,getLayoutSettings:e=>e.layout,getCurrencySettings:e=>e.currency,getWooCheckoutSettings:e=>e.wooCheckout,getWooProductsSettings:e=>e.wooProducts,getFormSettings:e=>e.formFields,getRecaptchaSettings:e=>e.recaptcha,getWarningTexts:e=>e.warningTexts,getPaymentGateway:e=>e.paymentGateway,getStripeData:e=>{var t,a,n;return(n=(a=(t=e.paymentGateway)==null?void 0:t.cards)==null?void 0:a.cardPayments)==null?void 0:n.stripe},getStripePublishKey:e=>{var a,n,s;const t=(s=(n=(a=e.paymentGateway)==null?void 0:a.cards)==null?void 0:n.cardPayments)==null?void 0:s.stripe;return(t==null?void 0:t.publishKey)||""},getStripeSecretKey:e=>{var a,n,s;const t=(s=(n=(a=e.paymentGateway)==null?void 0:a.cards)==null?void 0:n.cardPayments)==null?void 0:s.stripe;return(t==null?void 0:t.secretKey)||""},getRazorpayKeyId:e=>{var a,n,s;const t=(s=(n=(a=e.paymentGateway)==null?void 0:a.cards)==null?void 0:n.cardPayments)==null?void 0:s.razorpay;return(t==null?void 0:t.keyId)||""},getRazorpayPaymentCurrency:e=>{var a,n,s;const t=(s=(n=(a=e.paymentGateway)==null?void 0:a.cards)==null?void 0:n.cardPayments)==null?void 0:s.razorpay;return(t==null?void 0:t.currency)||"usd"},getThankYouPage:e=>e.thankYouPage,getInvoice:e=>e.invoice,getEditCalcButton:e=>e.editCalcButton,hasThankYouPage(e){const t=e.thankYouPage;return(t==null?void 0:t.enable)&&["same_page","modal"].includes(t==null?void 0:t.type)},getTermsAndConditionsStatus(e){var t,a,n;return(t=e.formFields)!=null&&t.accessTermsEmail?!((n=(a=e.formFields)==null?void 0:a.termsAndConditions)!=null&&n.checkbox):!1},checkTermsAndConditionsApproved(e){return e.termsAndConditionsTrigger?this.getTermsAndConditionsStatus:!1},getSummaryDisplayShowSummary(e){return e.summaryDisplayShowSummary},getLanguage(e){return e.language}},actions:{setLayout(e){this.general.layout=e},initGeolocationSettingsStore(e){const t=r(e);this.geolocation=t},initPdfSettings(e){const t=r(e);this.pdfSettings=t},initQuoteSettings(e){const t=r(e);this.quoteSettings=t},updateTermsValue(e){var t;this.setTermsAndConditionsTrigger(!1),(t=this.formFields)!=null&&t.accessTermsEmail&&(this.formFields.termsAndConditions.checkbox=e)},setTermsAndConditionsTrigger(e){var t;(t=this.formFields)!=null&&t.accessTermsEmail&&(this.termsAndConditionsTrigger=e)},initSettingsStore(e){var a,n,s,i,o,c,l,u,g,y;const t=r(e);if(this.general=t.general,this.layout=t.layout,this.currency=t.currency,this.thankYouPage=t.thankYouPage,this.stickyCalc=t.stickyCalc,this.formFields=t.formFields,this.warningTexts=t.texts,this.emailOptions=t.emailOptions,this.wooProducts=t.wooProducts,this.wooCheckout=t.wooCheckout,this.paymentGateway=t.paymentGateway,this.pageBreaker=t.pageBreak,this.notice=t.notice,this.invoice=t.invoice,this.editCalcButton=t.editCalcButton,(a=t.recaptcha)!=null&&a.enable){let m=(s=(n=t.recaptcha)==null?void 0:n.v2)==null?void 0:s.siteKey,d=(o=(i=t.recaptcha)==null?void 0:i.v2)==null?void 0:o.secretKey;((c=t.recaptcha)==null?void 0:c.type)==="v3"&&(m=(u=(l=t.recaptcha)==null?void 0:l.v3)==null?void 0:u.siteKey,d=(y=(g=t.recaptcha)==null?void 0:g.v3)==null?void 0:y.secretKey),this.recaptcha={enable:t.recaptcha.enable,type:t.recaptcha.type==="v2"?"v2":"v3",siteKey:m,secretKey:d}}},initLang(e){this.language=e},setSummaryDisplayShowSummary(e){this.summaryDisplayShowSummary=e}}});export{f as u};
//# sourceMappingURL=settingsStore-8bwiLMEn.js.map
