"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfirmDialog = ConfirmDialog;
const i18n_1 = __importDefault(require("../../../../../../../locales/i18n.js"));
const react_1 = __importDefault(require("react"));
const cn_ui_1 = require("@cainiaofe/cn-ui");
function ConfirmDialog({ visible, onClose, onSaveConfigOnly, onGenerateFirst5Rows, onGenerateAllRows, saving, executing, isProcessing, isEditStatus, }) {
    return (react_1.default.createElement(cn_ui_1.CnDialog, { visible: visible, onClose: onClose, title: react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
            react_1.default.createElement(cn_ui_1.CnIcon, { type: "help-color", size: 20, style: { marginRight: '4px' } }),
            i18n_1.default.get({ id: 'GenerateFullColumns', dm: '是否生成全列?' })), size: "small", footer: react_1.default.createElement(react_1.default.Fragment, null,
            isEditStatus && (react_1.default.createElement(cn_ui_1.CnButton, { type: "secondary", onClick: onSaveConfigOnly, loading: saving, disabled: isProcessing }, i18n_1.default.get({ id: 'SaveConfigurationOnly', dm: '仅保存配置' }))),
            react_1.default.createElement(cn_ui_1.CnButton, { type: "secondary", onClick: onGenerateAllRows, loading: executing, disabled: isProcessing }, i18n_1.default.get({ id: 'GenerateFullColumn', dm: '生成全列' })),
            react_1.default.createElement(cn_ui_1.CnButton, { type: "primary", onClick: onGenerateFirst5Rows, loading: executing, disabled: isProcessing }, i18n_1.default.get({ id: 'GenerateTheFirst5Rows', dm: '生成前5行' }))), okProps: {
            visible: false,
        }, cancelProps: {
            visible: false,
        } }, i18n_1.default.get({
        id: 'ConfirmThatGeneratingAFullColumn_1278071209',
        dm: '确认生成全列将自动更新当前视图下整列内容，并覆盖现有记录。本次操作可能需要一点时间。',
    })));
}
