const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./widget-DZZgQDKu.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{a as L,C as O,k as P,b as _,e as n,_ as u,o as M,m as c,g as l,p as d,q as p,f as h,n as $,L as w,D as g,u as a,r as N,I as W}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{c as j,u as z,m as U,n as G,d as H,a as J,l as K,o as Q}from"./widget-BUAABBRb.js";import{_ as X}from"./RequiredHint.vue_vue_type_style_index_0_lang-R4Bqx90z.js";import{c as Y}from"./ThankYouPage-bf4cLsjC.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./translationsStore-DBJu9sBR.js";import"./index-CEuXXsrq.js";import"./_plugin-vue_export-helper-DlAUqK2U.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"},ae={key:0,class:"ccb-field__descriptions ccb-before"},se={key:0,class:"ccb-field__description"},le={class:"ccb-field-input__wrapper"},re={key:1,class:"ccb-field__descriptions ccb-after"},oe={key:0,class:"ccb-field__description"},ge=L({__name:"MultiRange",props:{field:{}},setup(E){const F=E,{field:e}=O(F),S=K(),v=j(),C=z(),y=Q(),D=U(),x=G(),A=H(),b=P(e.value.values||[0,50]),o=P(0),R=_(()=>{var i;return((i=J().getWarningTexts)==null?void 0:i.requiredMsg)||""}),T=_(()=>{var i,r;const t=((r=(i=e.value)==null?void 0:i.styles)==null?void 0:r.style)||"default";return t==="default"?n(()=>u(()=>import("./Default-DlSqSqz3.js"),__vite__mapDeps([0,1]),import.meta.url)):t==="small"?n(()=>u(()=>import("./Small-DhPXJ2Qw.js"),__vite__mapDeps([0,2]),import.meta.url)):t==="flat-minimal"?n(()=>u(()=>import("./Flat-jnrMfepm.js"),__vite__mapDeps([0,3]),import.meta.url)):t==="modern"?n(()=>u(()=>import("./Modern-DHKd_Cnv.js"),__vite__mapDeps([0,4]),import.meta.url)):t==="input"?n(()=>u(()=>import("./Input-B44s8JO4.js"),__vite__mapDeps([5]),import.meta.url)):t==="multi-point"?n(()=>u(()=>import("./MultiPoint-BlRGdw3s.js"),__vite__mapDeps([0,6]),import.meta.url)):""}),k=(t,i,r)=>{if(i&&i!==e.value.alias)return;let s=0;const[m,f]=t;b.value=[m,f],f-m>0&&(s=f-m),o.value=s,e.value.multiply&&(s=s*e.value.unit),s=e.value.round?Math.round(s):s,e.value.value=s||0,e.value.values=t,e.value.displayValue=y.getCommonFieldDisplayView(e.value,(f-m).toString()),v.updateField(e.value.alias,e.value,r),x.applyConditionForField(e.value.alias),v.getPageBreakEnabled&&v.getActivePage.action==="not_skip"&&A.checkPageFieldsConditions()},q=_(()=>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} ${o.value}`:`${o.value} ${e.value.sign}`:y.parseCommonFieldSign(e.value.round?o.value.toString():B(o.value),e.value.sign,e.value.unitPosition)),V=_(()=>v.checkFieldRequired(e.value)),I=_(()=>{var t;return((t=e.value)==null?void 0:t.additionalStyles)||""}),B=t=>{const i=t.toFixed(2);return parseFloat(i).toString()};return D.add("updateMultiRange",k),M(()=>{const[t,i]=e.value.values;o.value=i-t}),(t,i)=>{var r;return l(),c("div",{class:W(["ccb-field ccb-multi-range-field",{required:V.value,"ccb-field-disabled":a(e).disabled,[I.value]:!0,[(r=a(e).styles)==null?void 0:r.style]:!0}])},[d("div",Z,[V.value?(l(),h(X,{key:0,text:R.value},null,8,["text"])):p("",!0),d("div",ee,[d("span",te,[d("span",null,[w(g(a(e).label),1),a(e).required?(l(),c("span",ie,"*")):p("",!0)]),d("span",null,g(q.value),1),$(Y)])])]),a(C).getAppearanceDescriptionPosition==="before"?(l(),c("div",ae,[a(e).description?(l(),c("div",se,g(a(e).description),1)):p("",!0)])):p("",!0),d("div",le,[(l(),h(N(T.value),{field:a(e),"onUpdate:modelValue":[k,i[0]||(i[0]=s=>b.value=s)],modelValue:b.value},null,8,["field","modelValue"]))]),a(C).getAppearanceDescriptionPosition==="after"?(l(),c("div",re,[a(e).description?(l(),c("div",oe,g(a(e).description),1)):p("",!0)])):p("",!0)],2)}}});export{ge as default};
//# sourceMappingURL=index-uYRFTzFm.js.map
