import $i18n from '../../../../../../locales/i18n.js';
import React from 'react';
import { CnButton, CnTooltip } from '@cainiaofe/cn-ui';
import { useAiTableIcons } from '../../../../../../cn-ai-table/view/hooks/use-ai-table-icons';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function ComponentButton({ viewId, isCompact = false }) {
    const icons = useAiTableIcons();
    const buttonElement = (React.createElement(CnButton, { text: true, className: "toolbar-btn" },
        React.createElement("img", { src: icons.TOOLBAR_COMPONENT, alt: $i18n.get({ id: 'Component', dm: '组件' }) }),
        React.createElement("span", null, $i18n.get({ id: 'Component', dm: '组件' }))));
    return isCompact ? (React.createElement(CnTooltip, { trigger: buttonElement, triggerType: "hover", align: "b" }, $i18n.get({ id: 'Component', dm: '组件' }))) : (buttonElement);
}
