"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InitPageView = exports.SmartFollowModeCard = void 0;
/**
 * 智能跟单模式选择初始化页
 * 首次进入智能跟单时展示，引导用户选择「通用智能模式」或「数字员工模式」
 */
const i18n_1 = __importDefault(require("../../../../../../locales/i18n.js"));
const classnames_1 = __importDefault(require("classnames"));
const react_1 = __importDefault(require("react"));
require("./init-page-view.scss");
/** 智能跟单模式选择卡片 */
const SmartFollowModeCard = (props) => {
    const { title, description, previewContent, onClick, className } = props;
    return (react_1.default.createElement("div", { role: "button", tabIndex: 0, className: (0, classnames_1.default)('smart-follow-mode-card', className), onClick: onClick, onKeyDown: (e) => {
            if (e.key === 'Enter' || e.key === ' ') {
                e.preventDefault();
                onClick === null || onClick === void 0 ? void 0 : onClick();
            }
        } },
        react_1.default.createElement("div", { className: "smart-follow-mode-card__preview" }, previewContent),
        react_1.default.createElement("div", { className: "smart-follow-mode-card__body" },
            react_1.default.createElement("div", { className: "smart-follow-mode-card__title" }, title),
            react_1.default.createElement("div", { className: "smart-follow-mode-card__desc" }, description))));
};
exports.SmartFollowModeCard = SmartFollowModeCard;
exports.SmartFollowModeCard.displayName = 'SmartFollowModeCard';
/** 智能跟单模式选择初始化页 */
const InitPageView = (props) => {
    const { onSelectMode, className } = props;
    const handleSelectGeneral = () => onSelectMode === null || onSelectMode === void 0 ? void 0 : onSelectMode('general');
    const handleSelectDigital = () => onSelectMode === null || onSelectMode === void 0 ? void 0 : onSelectMode('digitalEmployee');
    return (react_1.default.createElement("div", { className: (0, classnames_1.default)('init-page-view', className) },
        react_1.default.createElement("div", { className: "init-page-view__content" },
            react_1.default.createElement("span", { className: "init-page-view__title" },
                i18n_1.default.get({ id: 'FirstOfAll', dm: '首先,' }),
                react_1.default.createElement("span", { className: "init-page-view__title-bold" }, i18n_1.default.get({ id: 'ChooseYourSmartDocumentaryMode', dm: '选择您的智能跟单模式' }))),
            react_1.default.createElement("div", { className: "init-page-view__cards" },
                react_1.default.createElement(exports.SmartFollowModeCard, { title: i18n_1.default.get({ id: 'GeneralSmartMode', dm: '通用智能模式' }), description: i18n_1.default.get({
                        id: 'LetTheGeneralIntelligenceAnalyze_759199443',
                        dm: '让通用智能体分析单据数据,识别潜在问题遇风险,辅助跟单,您也可以自定义业务化的需求',
                    }), previewContent: react_1.default.createElement("div", { className: "smart-follow-mode-card__preview-slot smart-follow-mode-card__preview-slot--general" }), onClick: handleSelectGeneral }),
                react_1.default.createElement(exports.SmartFollowModeCard, { title: i18n_1.default.get({
                        id: 'DigitalEmployeeModelUnderConstru_177646633',
                        dm: '数字员工模式（建设中）',
                    }), description: i18n_1.default.get({
                        id: 'TogetherWithYourTeamAndBusinessP_1699857682',
                        dm: '与您的团队及业务一起,准备好数字员工,开始全新的跟单体验',
                    }), previewContent: react_1.default.createElement("div", { className: "smart-follow-mode-card__preview-slot smart-follow-mode-card__preview-slot--digital" }) })))));
};
exports.InitPageView = InitPageView;
exports.InitPageView.displayName = 'InitPageView';
exports.default = exports.InitPageView;
