"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComponentButton = ComponentButton;
const i18n_1 = __importDefault(require("../../../../../../locales/i18n.js"));
const react_1 = __importDefault(require("react"));
const cn_ui_1 = require("@cainiaofe/cn-ui");
const use_ai_table_icons_1 = require("../../../../../../cn-ai-table/view/hooks/use-ai-table-icons");
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function ComponentButton({ viewId, isCompact = false }) {
    const icons = (0, use_ai_table_icons_1.useAiTableIcons)();
    const buttonElement = (react_1.default.createElement(cn_ui_1.CnButton, { text: true, className: "toolbar-btn" },
        react_1.default.createElement("img", { src: icons.TOOLBAR_COMPONENT, alt: i18n_1.default.get({ id: 'Component', dm: '组件' }) }),
        react_1.default.createElement("span", null, i18n_1.default.get({ id: 'Component', dm: '组件' }))));
    return isCompact ? (react_1.default.createElement(cn_ui_1.CnTooltip, { trigger: buttonElement, triggerType: "hover", align: "b" }, i18n_1.default.get({ id: 'Component', dm: '组件' }))) : (buttonElement);
}
