import { jsx as _jsx } from "react/jsx-runtime";
import { NumberField } from '../../../scalars/components/number-field/number-field.js';
export const buildNumberCellEditor = (numberFieldProps) => {
    const NumberCellEditor = (value, onChange, context) => {
        const numericValue = typeof value === 'number' ? value : Number(value) || 0;
        return (_jsx(NumberField, { name: context.column.field, autoComplete: "off", className: "max-w-full", autoFocus: true, ...numberFieldProps, value: numericValue, onChange: (event) => {
                onChange(Number(event.target.value));
            } }));
    };
    return NumberCellEditor;
};
//# sourceMappingURL=number-editor.js.map