import{S as O}from"./SettingsBlock-BrIg2SdR.js";import{_,b as V}from"./settings.consts-C6F6lZ8o.js";import{B as D}from"./ThemeToggle-a3yohy6x.js";import{_ as g}from"./Dropdown.vue_vue_type_script_setup_true_lang-DIVo72j0.js";import{N as U}from"./Notice-C2RL1xnT.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{a as z}from"./EmbedPopup-BUj0yGgY.js";import{d as E,e as G,f as I,i as C,k as $,t as A,j as o,m as x,x as s}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{r as i,u as a}from"./vendor-vue-reactivity-CheHbvBM.js";import{_ as J}from"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-vue-shared-DrzsEcag.js";import"./admin-BM775jCq.js";import"./vendor-vue-runtime-dom-B2rky8vu.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";/* empty css               */import"./useAppearanceStore-IzenP-G4.js";import"./vendor-vue-flow-CRbOssRZ.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";const L={class:"ccb-settings-section"},R={class:"ccb-notice__content"},T={class:"ccb-settings__row"},j={class:"ccb-settings__col"},q={class:"ccb-settings__row"},F={class:"ccb-settings__col"},H={class:"ccb-settings__col"},K={class:"ccb-settings__row"},M={class:"ccb-settings__col"},Q={class:"ccb-settings__col"},W={class:"ccb-settings__col"},X=E({__name:"Currency",setup(Y){var b,y,h,v,S,w;const n=z(),f=G(()=>{var r;return(r=n.getGeneralSettings)==null?void 0:r.currency.use_in_all}),c=i(((b=n.getSettings)==null?void 0:b.currency.currency)||""),u=i(((y=n.getSettings)==null?void 0:y.currency.currencyPosition)||""),m=i(((h=n.getSettings)==null?void 0:h.currency.thousands_separator)||""),d=i(((S=(v=n.getSettings)==null?void 0:v.currency.num_after_integer)==null?void 0:S.toString())||"2"),p=i(((w=n.getSettings)==null?void 0:w.currency.decimal_separator)||""),N=i([{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Left with space",value:"left_with_space"},{label:"Right with space",value:"right_with_space"}]),P=i([{label:"Comma",value:","},{label:"Dot",value:"."},{label:"Apostrophe",value:"'"},{label:"Space",value:" "}]),k=i([{label:"Comma",value:","},{label:"Dot",value:"."}]),l=(r,e)=>{const t=JSON.parse(JSON.stringify(n.getSettings));r==="currency"&&(t.currency.currency=e,c.value=e),r==="currencyPosition"&&(t.currency.currencyPosition=e,u.value=e),r==="num_after_integer"&&(t.currency.num_after_integer=parseInt(e),d.value=e),r==="thousands_separator"&&(t.currency.thousands_separator=e,m.value=e),r==="decimal_separator"&&(t.currency.decimal_separator=e,p.value=e),n.setSettings(t)},B=()=>{window.location.href="/wp-admin/admin.php?page=cost_calculator_builder_settings&option=currency"};return(r,e)=>(C(),I("div",L,[f.value?(C(),$(a(U),{key:0,type:"warning"},{default:x(()=>[s("div",R,[o(a(_),{text:"Global settings applied",size:"m",weight:"bold"}),o(a(_),{text:"If you want to set up a specific calculator, please go to Settings → Currency and turn off the setting “Apply for all calculators”",size:"m",weight:"regular"}),o(a(D),{label:"Go to Settings",type:"blue",size:"m",weight:"regular",onClick:B,showOriginal:!0})])]),_:1})):A("",!0),o(O,{disabled:f.value},{default:x(()=>[s("div",T,[s("div",j,[o(a(_),{text:"Currency",size:"m",weight:"bold"})])]),s("div",q,[s("div",F,[o(a(V),{placeholder:"Enter currency sign",modelValue:c.value,"onUpdate:modelValue":e[0]||(e[0]=t=>c.value=t),label:"Currency Sign",name:"currency",onChange:l},null,8,["modelValue"])]),s("div",H,[o(a(g),{label:"Currency Position",items:N.value,modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=t=>u.value=t),name:"currencyPosition",onChange:l},null,8,["items","modelValue"])])]),s("div",K,[s("div",M,[o(a(V),{placeholder:"Enter number of decimals",modelValue:d.value,"onUpdate:modelValue":e[2]||(e[2]=t=>d.value=t),label:"Number of Decimals",name:"num_after_integer",onChange:l},null,8,["modelValue"])]),s("div",Q,[o(a(g),{items:P.value,modelValue:m.value,"onUpdate:modelValue":e[3]||(e[3]=t=>m.value=t),label:"Thousands Separator",name:"thousands_separator",onChange:l},null,8,["items","modelValue"])]),s("div",W,[o(a(g),{items:k.value,modelValue:p.value,"onUpdate:modelValue":e[4]||(e[4]=t=>p.value=t),label:"Decimal Separator",name:"decimal_separator",onChange:l},null,8,["items","modelValue"])])])]),_:1},8,["disabled"])]))}}),Ve=J(X,[["__scopeId","data-v-e0c9eb25"]]);export{Ve as default};
//# sourceMappingURL=Currency-C3vBftgv.js.map
