import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { IMaskMixin } from 'react-imask-next';
import { TextField } from '../TextField';
import { useLogic } from './useLogic';
const MaskedNumberField = IMaskMixin(({ typedValue, onChange, ...props }) => {
    const textFieldProps = props;
    return _jsx(TextField, { ...textFieldProps });
});
export const NumberField = forwardRef((props, ref) => {
    const { maskProps } = useLogic(props);
    return (_jsx(MaskedNumberField, { inputRef: ref, unmask: "typed", mask: Number, thousandsSeparator: ' ', ...props, ...maskProps }));
});
