import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import t from"react-number-format";import n from"prop-types";import{jsx as o}from"react/jsx-runtime";var i=["inputRef","onChange"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function u(e){var n=e.inputRef,a=e.onChange,u=r(e,i);return o(t,p(p({},u),{},{getInputRef:n,onValueChange:function(r){a({target:{name:e.name,value:r.value}})},thousandSeparator:!0,isNumericString:!0,prefix:"$",allowNegative:!1,allowLeadingZeros:!1}))}u.propTypes={inputRef:n.func.isRequired,name:n.string.isRequired,onChange:n.func.isRequired,decimalScale:n.number},u.defaultProps={decimalScale:2};export{u as default};
