const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vueform-slider-BwB83iY9.css","./Default-CSzo6teH.css","./Small-eTsWjY0d.css","./Flat-DgaHsBL7.css","./Modern-BtZrisUs.css","./Input-qaDW4KRT.css","./MultiPoint-n9dMJlw5.css"])))=>i.map(i=>d[i]);
import{_ as n}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as O,a as $,m as L,n as M}from"./fieldsStore-CQRN0FvQ.js";import{u as w}from"./appearanceStore-Cp-euDX2.js";import{u as N}from"./callbackStore-BhxBUA6V.js";import{_ as j}from"./RequiredHint.vue_vue_type_style_index_0_lang-DGTCbwUk.js";import{_ as z}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{u as W}from"./pageBreakerStore-BevSHYnU.js";import{u as U}from"./settingsStore-8bwiLMEn.js";import{d as G,e as m,$ as u,a as H,f as c,i as o,x as d,t as p,k as P,j as J,z as K,v as Q}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as X,r as h,u as r}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as g,a as Y}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./appStore-CFAkQG2b.js";import"./translationsStore-D6vLzgNA.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";const Z={class:"ccb-field__label"},ee={class:"ccb-field__title"},te={class:"ccb-field__title--title-box",style:{display:"flex",width:"100%","justify-content":"space-between"}},ie={key:0,class:"ccb-field-required-mark"},re={key:0,class:"ccb-field__descriptions ccb-before"},ae={key:0,class:"ccb-field__description"},oe={class:"ccb-field-input__wrapper"},se={key:1,class:"ccb-field__descriptions ccb-after"},le={key:0,class:"ccb-field__description"},Ee=G({__name:"MultiRange",props:{field:{}},setup(E){const F=E,{field:e}=X(F),S=L(),_=O(),C=w(),y=M(),x=N(),A=$(),D=W(),b=h(e.value.values||[0,50]),l=h(0),R=m(()=>{var i;return((i=U().getWarningTexts)==null?void 0:i.requiredMsg)||""}),T=m(()=>{var i,s;const t=((s=(i=e.value)==null?void 0:i.styles)==null?void 0:s.style)||"default";return t==="default"?u(()=>n(()=>import("./Default-DCOvHSMf.js"),__vite__mapDeps([0,1]),import.meta.url)):t==="small"?u(()=>n(()=>import("./Small-B2QM1l_z.js"),__vite__mapDeps([0,2]),import.meta.url)):t==="flat-minimal"?u(()=>n(()=>import("./Flat-CKJSgjKS.js"),__vite__mapDeps([0,3]),import.meta.url)):t==="modern"?u(()=>n(()=>import("./Modern-4H5QihzZ.js"),__vite__mapDeps([0,4]),import.meta.url)):t==="input"?u(()=>n(()=>import("./Input-Ci7CcSjK.js"),__vite__mapDeps([0,5]),import.meta.url)):t==="multi-point"?u(()=>n(()=>import("./MultiPoint-Dn6qekQh.js"),__vite__mapDeps([0,6]),import.meta.url)):""}),k=(t,i,s)=>{if(i&&i!==e.value.alias)return;let a=0;const[v,f]=t;b.value=[v,f],f-v>0&&(a=f-v),l.value=a,e.value.multiply&&(a=a*e.value.unit),a=e.value.round?Math.round(a):a,e.value.value=a||0,e.value.values=t,e.value.displayValue=y.getCommonFieldDisplayView(e.value,(f-v).toString()),_.updateField(e.value.alias,e.value,s),A.applyConditionForField(e.value.alias),_.getPageBreakEnabled&&_.getActivePage.action==="not_skip"&&D.checkPageFieldsConditions()},q=m(()=>e.value.multipliedTotal?e.value.useCurrency||e.value.fieldCurrency?S.formatCurrency(e.value.value,S.getCurrencyOptions(e.value)):y.parseCommonFieldSign(e.value.value.toString(),e.value.sign,e.value.unitPosition):e.value.useCurrency||e.value.fieldCurrency?e.value.unitPosition==="left"?`${e.value.sign} ${l.value}`:`${l.value} ${e.value.sign}`:y.parseCommonFieldSign(e.value.round?l.value.toString():I(l.value),e.value.sign,e.value.unitPosition)),V=m(()=>_.checkFieldRequired(e.value)),B=m(()=>{var t;return((t=e.value)==null?void 0:t.additionalStyles)||""}),I=t=>{const i=t.toFixed(2);return parseFloat(i).toString()};return x.add("updateMultiRange",k),H(()=>{const[t,i]=e.value.values;l.value=i-t}),(t,i)=>{var s;return o(),c("div",{class:Y(["ccb-field ccb-multi-range-field",{required:V.value,"ccb-field-disabled":r(e).disabled,[B.value]:!0,[(s=r(e).styles)==null?void 0:s.style]:!0}])},[d("div",Z,[V.value?(o(),P(j,{key:0,text:R.value},null,8,["text"])):p("",!0),d("div",ee,[d("span",te,[d("span",null,[K(g(r(e).label),1),r(e).required?(o(),c("span",ie,"*")):p("",!0)]),d("span",null,g(q.value),1),J(z)])])]),r(C).getAppearanceDescriptionPosition==="before"?(o(),c("div",re,[r(e).description?(o(),c("div",ae,g(r(e).description),1)):p("",!0)])):p("",!0),d("div",oe,[(o(),P(Q(T.value),{field:r(e),"onUpdate:modelValue":[k,i[0]||(i[0]=a=>b.value=a)],modelValue:b.value},null,8,["field","modelValue"]))]),r(C).getAppearanceDescriptionPosition==="after"?(o(),c("div",se,[r(e).description?(o(),c("div",le,g(r(e).description),1)):p("",!0)])):p("",!0)],2)}}});export{Ee as default};
//# sourceMappingURL=index-Bw0DMmGk.js.map
