import { jsx as _jsx } from "react/jsx-runtime";
import { CurrencyCodeField } from '../../../scalars/components/currency-code-field/currency-code-field.js';
export const buildCurrencyCellEditor = (currencyFieldProps) => {
    const CurrencyCellEditor = (value, onChange, context) => {
        const currencyValue = typeof value === 'string' ? value : String(value ?? '');
        return (_jsx(CurrencyCodeField, { name: context.column.field, className: "max-w-full", autoFocus: true, ...currencyFieldProps, value: currencyValue, onChange: (value) => {
                onChange(value);
            } }));
    };
    return CurrencyCellEditor;
};
//# sourceMappingURL=currency-editor.js.map