import { jsx as _jsx } from "react/jsx-runtime";
import { SelectField } from '../../../scalars/components/fragments/select-field/index.js';
export const buildEnumCellEditor = (selectFieldProps) => {
    const EnumCellEditor = (value, onChange, context) => {
        const enumValue = typeof value === 'string' ? value : String(value ?? '');
        return (_jsx(SelectField, { name: context.column.field, className: "max-w-full", autoFocus: true, ...selectFieldProps, value: enumValue, onChange: (newValue) => {
                onChange(newValue);
            } }));
    };
    return EnumCellEditor;
};
//# sourceMappingURL=enum-editor.js.map