"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wHeadingListConfig = exports.wHeading6ItemData = exports.wHeading5ItemData = exports.wHeading4ItemData = exports.wHeading3ItemData = exports.wHeading2ItemData = exports.wHeading1ItemData = exports.wTextItemData = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const menubar_1 = require("../../i18n/menubar/index.js");
const shortcuts_1 = require("../../shortcuts/index.js");
const action_names_1 = require("./action-names.js");
const icons_1 = require("./icons.js");
const HeadingPreview_1 = require("./previews/HeadingPreview.js");
const TextPreview_1 = require("./previews/TextPreview.js");
exports.wTextItemData = {
    id: action_names_1.ActionName.paragraph,
    title: menubar_1.i18n.bind(null, 'text'),
    icon: icons_1.icons.text,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Text),
    exec: (e) => e.actions.toParagraph.run(),
    isActive: (e) => e.actions.toParagraph.isActive(),
    isEnable: (e) => e.actions.toParagraph.isEnable(),
    doNotActivateList: true,
    preview: (0, jsx_runtime_1.jsx)(TextPreview_1.TextPreview, {}),
};
exports.wHeading1ItemData = {
    id: action_names_1.ActionName.heading1,
    title: menubar_1.i18n.bind(null, 'heading1'),
    icon: icons_1.icons.h1,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading1),
    exec: (e) => e.actions.toH1.run(),
    isActive: (e) => e.actions.toH1.isActive(),
    isEnable: (e) => e.actions.toH1.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 1 }),
};
exports.wHeading2ItemData = {
    id: action_names_1.ActionName.heading2,
    title: menubar_1.i18n.bind(null, 'heading2'),
    icon: icons_1.icons.h2,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading2),
    exec: (e) => e.actions.toH2.run(),
    isActive: (e) => e.actions.toH2.isActive(),
    isEnable: (e) => e.actions.toH2.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 2 }),
};
exports.wHeading3ItemData = {
    id: action_names_1.ActionName.heading3,
    title: menubar_1.i18n.bind(null, 'heading3'),
    icon: icons_1.icons.h3,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading3),
    exec: (e) => e.actions.toH3.run(),
    isActive: (e) => e.actions.toH3.isActive(),
    isEnable: (e) => e.actions.toH3.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 3 }),
};
exports.wHeading4ItemData = {
    id: action_names_1.ActionName.heading4,
    title: menubar_1.i18n.bind(null, 'heading4'),
    icon: icons_1.icons.h4, // Предполагается, что icon исправлен для h4
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading4),
    exec: (e) => e.actions.toH4.run(),
    isActive: (e) => e.actions.toH4.isActive(),
    isEnable: (e) => e.actions.toH4.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 4 }),
};
exports.wHeading5ItemData = {
    id: action_names_1.ActionName.heading5,
    title: menubar_1.i18n.bind(null, 'heading5'),
    icon: icons_1.icons.h5, // Предполагается, что icon исправлен для h5
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading5),
    exec: (e) => e.actions.toH5.run(),
    isActive: (e) => e.actions.toH5.isActive(),
    isEnable: (e) => e.actions.toH5.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 5 }),
};
exports.wHeading6ItemData = {
    id: action_names_1.ActionName.heading6,
    title: menubar_1.i18n.bind(null, 'heading6'),
    icon: icons_1.icons.h6, // Предполагается, что icon исправлен для h6
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Heading6),
    exec: (e) => e.actions.toH6.run(),
    isActive: (e) => e.actions.toH6.isActive(),
    isEnable: (e) => e.actions.toH6.isEnable(),
    preview: (0, jsx_runtime_1.jsx)(HeadingPreview_1.HeadingPreview, { level: 6 }),
};
exports.wHeadingListConfig = {
    icon: icons_1.icons.headline,
    withArrow: true,
    title: menubar_1.i18n.bind(null, 'heading'),
    data: [
        exports.wTextItemData,
        exports.wHeading1ItemData,
        exports.wHeading2ItemData,
        exports.wHeading3ItemData,
        exports.wHeading4ItemData,
        exports.wHeading5ItemData,
        exports.wHeading6ItemData,
    ],
};
//# sourceMappingURL=w-heading-config.js.map
