import formatTag from './format-tag';
import formatEllipsis from './format-ellipsis';
import formatNumber from './format-number';
// eslint-disable-next-line import/no-cycle
import formatEnumeration from './format-enumeration';
import { createCurrencyFormat } from './format-currency';
import { createCurrencyWithUnitFormat } from './format-currency-with-unit';
import { createPercentFormat } from './format-percent';
import { createUserFormat } from './format-user';
import { createGraphicsPercentFormat } from './format-graphics-percent';
import { createProgressFormat } from './format-progress';
import { createMultipleTextFormat } from './format-multiple-text';
import { createImageTextFormat } from './format-image-text';
import { createDateFormat } from './format-date';
import { createDateTimeFormat } from './format-date-time';
import { createFileFormat } from './format-file';
import { createBankFormat } from './format-bank';
import { createMicrometerFormat } from './format-micrometer';
import { createAiGenerateFormat } from './format-ai-generate';
import { createFormulaFormat } from './format-formula';
/**
 * 获取默认格式映射表
 * @param context 本地化上下文
 * @param adapterLocale 本地化适配标识
 * @returns 格式映射表
 */
const getDefaultFormat = (context, adapterLocale) => {
    const numAdapterLocale = adapterLocale !== undefined ? adapterLocale : context === null || context === void 0 ? void 0 : context.numAdapterLocale;
    const dateAdapterLocale = adapterLocale !== undefined ? adapterLocale : context === null || context === void 0 ? void 0 : context.dateAdapterLocale;
    return {
        tag: formatTag,
        number: {
            cell(val) {
                return formatNumber(val, numAdapterLocale);
            },
        },
        currency: createCurrencyFormat(numAdapterLocale),
        'currency-with-unit': createCurrencyWithUnitFormat(numAdapterLocale),
        percent: createPercentFormat(numAdapterLocale),
        user: createUserFormat(),
        'graphics-percent': createGraphicsPercentFormat(),
        progress: createProgressFormat(numAdapterLocale),
        'multiple-text': createMultipleTextFormat(),
        'image-text': createImageTextFormat(),
        date: createDateFormat(dateAdapterLocale),
        'date-time': createDateTimeFormat(dateAdapterLocale),
        file: createFileFormat(),
        bank: createBankFormat(),
        ellipsis: formatEllipsis,
        micrometer: createMicrometerFormat(),
        enumeration: formatEnumeration,
        'ai-generate': createAiGenerateFormat,
        formula: createFormulaFormat,
    };
};
export default getDefaultFormat;
