import{w as D}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{$ as z}from"./vendor-jquery-D5wxN8bs.js";import{u as E}from"./sticky-3wbT2QJo.js";import{u as N}from"./useSticky-D4NGUYBY.js";import{u as V}from"./translationsStore-D6vLzgNA.js";import{d as H,e as A,a as j,f as i,t as u,i as c,x as o}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as t}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as a,b as q,a as G}from"./vendor-vue-shared-DrzsEcag.js";import{_ as J}from"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-bootstrap-CCU-90um.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-html2canvas-BfYXEYrK.js";const K={class:"sticky-calculator-banner--container ccb-desktop"},O={class:"sticky-calculator-banner--left"},Q={key:0,class:"sticky-bar-icon is-image"},R=["src"],U={key:1,class:"ccb-icon-Calculators-filled"},X={class:"sticky-bar-text"},Y={class:"sticky-bar-text__title"},Z={key:0,class:"sticky-bar-text__description"},$={class:"sticky-calculator-banner--right"},tt={key:0,class:"sticky-bar-totals"},st={class:"sticky-bar-action"},ot=["textContent"],et={class:"sticky-calculator-banner--container ccb-mobile"},it={class:"sticky-calculator-banner--top"},ct={key:0,class:"sticky-bar-icon"},nt=["src"],at={key:1,class:"ccb-icon-Calculators-filled"},lt={class:"ccb-sticky-banner-content"},rt={class:"sticky-bar-text"},dt={class:"sticky-bar-text__title"},_t={key:0,class:"sticky-bar-text__description"},ut={key:0,class:"sticky-bar-totals"},gt={class:"sticky-calculator-banner--bottom"},kt={class:"sticky-bar-action"},mt=["textContent"],yt=H({__name:"FloatingBar",setup(pt){const s=E(),p=V(),{classList:g,clickAction:m,getFormattedTotal:S,getTitle:h,showTotal:b,updateFormulas:B,initListeners:F,scrollHandler:I,updateClassList:f,customBannerEvent:W}=N(),L=A(()=>{var l,r,d,_;let n=0;const e=z("#wpadminbar");return e!=null&&e.length&&((l=s.getStickySettings)==null?void 0:l.bannerPosition)==="top"&&window.innerWidth>600&&(n+=(e==null?void 0:e.height())||0),((r=s.getStickySettings)==null?void 0:r.bannerPosition)==="bottom"&&window.innerWidth<=540&&((d=s.getStickySettings)!=null&&d.showCalculator)&&(n=56),{[((_=s.getStickySettings)==null?void 0:_.bannerPosition)||""]:`${n}px`}}),M=A(()=>{var n;return window.innerWidth<=640&&((n=s.getStickySettings)==null?void 0:n.showCalculator)});return j(()=>{var r,d,_,k;const n=((r=s.getStickySettings)==null?void 0:r.bannerPosition)||"",e=((d=s.getStickySettings)==null?void 0:d.oneClickAction)||"";g.value.includes(n)||f([...g.value,n]),g.value.includes("modal-action")||f([...g.value,"modal-action"]),["open_modal","pro_features","woo_product_as_modal"].includes(e)?W(!0):e==="scroll_to"&&I();let l=((_=s.getStickySettings)==null?void 0:_.formulas)||[];["woo_checkout","woo_product_as_modal","woo_product_with_redirect"].includes(e)&&(l=((k=s.getWooCheckoutSettings)==null?void 0:k.formulas)||[]),B(l),F()}),(n,e)=>{var l,r,d,_,k,v,x,C,w,T,P;return M.value?u("",!0):(c(),i("div",{key:0,class:G(["sticky-calculator-banner",t(g)]),style:q(L.value)},[o("div",K,[o("div",O,[(l=t(s).getStickySettings)!=null&&l.hideIcon?u("",!0):(c(),i("div",Q,[(r=t(s).getStickySettings)!=null&&r.icon?(c(),i("img",{key:0,src:t(s).getStickySettings.icon,alt:"icon svg"},null,8,R)):(c(),i("i",U))])),o("div",X,[o("span",Y,a(t(h)),1),(_=(d=t(s).getStickySettings)==null?void 0:d.customDesc.trim())!=null&&_.length?(c(),i("span",Z,a(t(s).getStickySettings.customDesc),1)):u("",!0)])]),o("div",$,[t(b)?(c(),i("div",tt,[o("span",null,a(t(p).getTranslations.total)+": "+a(t(S)),1)])):u("",!0),o("div",st,[o("button",{onClick:e[0]||(e[0]=D((...y)=>t(m)&&t(m)(...y),["prevent"])),style:{height:"40px"},class:"calc-btn-action success",textContent:a((k=t(s).getStickySettings)==null?void 0:k.btnText)},null,8,ot)])])]),o("div",et,[o("div",it,[(v=t(s).getStickySettings)!=null&&v.hideIcon?u("",!0):(c(),i("div",ct,[(x=t(s).getStickySettings)!=null&&x.icon?(c(),i("img",{key:0,src:t(s).getStickySettings.icon,alt:"icon svg"},null,8,nt)):(c(),i("i",at))])),o("div",lt,[o("div",rt,[o("span",dt,a(t(h)),1),(T=(w=(C=t(s).getStickySettings)==null?void 0:C.customDesc)==null?void 0:w.trim())!=null&&T.length?(c(),i("span",_t,a(t(s).getStickySettings.customDesc),1)):u("",!0)]),t(b)?(c(),i("div",ut,[o("span",null,a(t(p).getTranslations.total)+": "+a(t(S)),1)])):u("",!0)])]),o("div",gt,[o("div",kt,[o("button",{onClick:e[1]||(e[1]=D((...y)=>t(m)&&t(m)(...y),["prevent"])),style:{height:"40px"},class:"calc-btn-action success",textContent:a((P=t(s).getStickySettings)==null?void 0:P.btnText)},null,8,mt)])])])],6))}}}),Wt=J(yt,[["__scopeId","data-v-96aad2a8"]]);export{Wt as default};
//# sourceMappingURL=index-CrQ6OO4O.js.map
