import{slicedToArray as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{debounce as o}from"lodash-es";import n from"../TextField/TextField.js";import{useSliderSelection as i,useSliderActions as a}from"./SliderContext.js";import{InfixKind as u}from"./SliderConstants.js";var l=function(l){var m=l.kind,f=(void 0===m?u.PREFIX:m)===u.POSTFIX,s=i(),p=function(r,e,t,o){return e?r?[t[1],o[1]]:[t[0],o[0]]:[t,o]}(f,s.ranged,s.value,s.valueText),c=r(p,2)[1],d=a().changeThumbValue,v=t((function(){return o((function(r){var e=function(r){return r.replace(/\D/g,"")}(r);d(e,f?1:0,!0)}),300)}),[d,f]);return e(n,{onChange:v,value:c+""})};export{l as default};
