import{a as N,C as y,b as r,k as w,O as p,m as C,g as U,p as s,n as k,M as v,U as c,u as m}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import{m as B}from"./slider-B0ER1pJ5.js";const F={class:"slider-wrapper ccb-input-multi-range-field"},I={class:"slider-input"},S=["min","max"],A={class:"slider-input"},M=["min","max"],E=N({__name:"Input",props:{field:{},modelValue:{}},emits:["update:modelValue"],setup(V,{emit:f}){const i=V,{field:l}=y(i),x=r(()=>l.value.jump?1:Number(l.value.step||1)),u=r(()=>Number(l.value.min)),o=r(()=>Number(l.value.max)),t=w(i.modelValue),d=f,g=e=>{d("update:modelValue",Array.isArray(e)?e:[e])},b=e=>{const a=e.target;Number(a.value)<u.value&&(a.value=u.value.toString(),t.value[0]=u.value)},_=e=>{const a=e.target;Number(a.value)>o.value&&(a.value=o.value.toString(),t.value[1]=o.value)},h=e=>{const a=e.toFixed(2);return parseFloat(a).toString()};return p(()=>i.modelValue,e=>{t.value=e}),p(t,e=>{d("update:modelValue",e)},{deep:!0}),(e,a)=>(U(),C("div",F,[s("div",I,[v(s("input",{type:"number","onUpdate:modelValue":a[0]||(a[0]=n=>t.value[0]=n),min:u.value,max:o.value,onChange:b},null,40,S),[[c,t.value[0]]])]),k(m(B),{style:{margin:"10px 0"},format:h,min:m(l).min,max:m(l).max,step:x.value,disabled:m(l).disabled,modelValue:e.modelValue,"onUpdate:modelValue":g,"show-tooltip":"focus"},null,8,["min","max","step","disabled","modelValue"]),s("div",A,[v(s("input",{type:"number","onUpdate:modelValue":a[1]||(a[1]=n=>t.value[1]=n),min:u.value,max:o.value,onChange:_},null,40,M),[[c,t.value[1]]])])]))}});export{E as default};
//# sourceMappingURL=Input-B44s8JO4.js.map
