"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wSelectionMenuConfigByPreset = exports.wHiddenDataByPreset = exports.wCommandMenuConfigByPreset = exports.wToolbarConfigByPreset = exports.wSelectionMenuConfig = exports.wToolbarConfig = exports.wBiusGroupConfig = exports.wHistoryGroupConfig = exports.wHiddenData = exports.wCommandMenuConfig = exports.wMathListConfig = exports.wCodeListConfig = exports.wListMoveListConfig = exports.wListsListConfig = exports.wLiftListItemData = exports.wSinkListItemData = exports.wOrderedListItemData = exports.wBulletListItemData = exports.wMathListItem = exports.textContextItemData = exports.wToggleHeadingFoldingItemData = exports.wEmojiItemData = exports.wHruleItemData = exports.wCodeBlockItemData = exports.wMermaidItemData = exports.wYfmHtmlBlockItemData = exports.wMathBlockItemData = exports.wMathInlineItemData = exports.wTabsItemData = exports.wFileItemData = exports.wImageItemData = exports.wCodeItemData = exports.wTableItemData = exports.wNoteItemData = exports.wCutItemData = exports.wQuoteItemData = exports.wLinkItemData = exports.wCheckboxItemData = exports.wMarkedItemData = exports.wMonospaceItemData = exports.wStrikethroughItemData = exports.wUnderlineItemData = exports.wItalicItemData = exports.wBoldItemData = exports.wRedoItemData = exports.wUndoItemData = void 0;
const tslib_1 = require("tslib");
/**
 * @deprecated This file is deprecated. Use ToolbarsPreset instead.
 */
const extensions_1 = require("../../extensions/index.js");
const hints_1 = require("../../i18n/hints/index.js");
const menubar_1 = require("../../i18n/menubar/index.js");
const shortcuts_1 = require("../../shortcuts/index.js");
const types_1 = require("../toolbar/types.js");
const WToolbarColors_1 = require("../toolbar/wysiwyg/WToolbarColors.js");
const WToolbarTextSelect_1 = require("../toolbar/wysiwyg/WToolbarTextSelect.js");
const action_names_1 = require("./action-names.js");
const icons_1 = require("./icons.js");
const w_heading_config_1 = require("./w-heading-config.js");
tslib_1.__exportStar(require("./w-heading-config.js"), exports);
exports.wUndoItemData = {
    id: action_names_1.ActionName.undo,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'undo'),
    icon: icons_1.icons.undo,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Undo),
    hintWhenDisabled: false,
    exec: (e) => e.actions.undo.run(),
    isActive: (e) => e.actions.undo.isActive(),
    isEnable: (e) => e.actions.undo.isEnable(),
};
exports.wRedoItemData = {
    id: action_names_1.ActionName.redo,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'redo'),
    icon: icons_1.icons.redo,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Redo),
    hintWhenDisabled: false,
    exec: (e) => e.actions.redo.run(),
    isActive: (e) => e.actions.redo.isActive(),
    isEnable: (e) => e.actions.redo.isEnable(),
};
// ----
exports.wBoldItemData = {
    id: action_names_1.ActionName.bold,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'bold'),
    icon: icons_1.icons.bold,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Bold),
    exec: (e) => e.actions.bold.run(),
    isActive: (e) => e.actions.bold.isActive(),
    isEnable: (e) => e.actions.bold.isEnable(),
};
exports.wItalicItemData = {
    id: action_names_1.ActionName.italic,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'italic'),
    icon: icons_1.icons.italic,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Italic),
    exec: (e) => e.actions.italic.run(),
    isActive: (e) => e.actions.italic.isActive(),
    isEnable: (e) => e.actions.italic.isEnable(),
};
exports.wUnderlineItemData = {
    id: action_names_1.ActionName.underline,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'underline'),
    icon: icons_1.icons.underline,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Underline),
    exec: (e) => e.actions.underline.run(),
    isActive: (e) => e.actions.underline.isActive(),
    isEnable: (e) => e.actions.underline.isEnable(),
};
exports.wStrikethroughItemData = {
    id: action_names_1.ActionName.strike,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'strike'),
    icon: icons_1.icons.strikethrough,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Strike),
    exec: (e) => e.actions.strike.run(),
    isActive: (e) => e.actions.strike.isActive(),
    isEnable: (e) => e.actions.strike.isEnable(),
};
exports.wMonospaceItemData = {
    id: action_names_1.ActionName.mono,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'mono'),
    icon: icons_1.icons.mono,
    exec: (e) => e.actions.mono.run(),
    isActive: (e) => e.actions.mono.isActive(),
    isEnable: (e) => e.actions.mono.isEnable(),
};
exports.wMarkedItemData = {
    id: action_names_1.ActionName.mark,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'mark'),
    icon: icons_1.icons.mark,
    exec: (e) => e.actions.mark.run(),
    isActive: (e) => e.actions.mark.isActive(),
    isEnable: (e) => e.actions.mark.isEnable(),
};
// ----
exports.wCheckboxItemData = {
    id: action_names_1.ActionName.checkbox,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'checkbox'),
    icon: icons_1.icons.checklist,
    exec: (e) => e.actions.addCheckbox.run(),
    isActive: (e) => e.actions.addCheckbox.isActive(),
    isEnable: (e) => e.actions.addCheckbox.isEnable(),
};
exports.wLinkItemData = {
    id: action_names_1.ActionName.link,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'link'),
    icon: icons_1.icons.link,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Link),
    exec: (e) => e.actions.addLink.run(),
    isActive: (e) => e.actions.addLink.isActive(),
    isEnable: (e) => e.actions.addLink.isEnable(),
};
exports.wQuoteItemData = {
    id: action_names_1.ActionName.quote,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'quote'),
    icon: icons_1.icons.quote,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Quote),
    exec: (e) => e.actions.quote.run(),
    isActive: (e) => e.actions.quote.isActive(),
    isEnable: (e) => e.actions.quote.isEnable(),
};
exports.wCutItemData = {
    id: action_names_1.ActionName.yfm_cut,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'cut'),
    icon: icons_1.icons.cut,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Cut),
    exec: (e) => e.actions.toYfmCut.run(),
    isActive: (e) => e.actions.toYfmCut.isActive(),
    isEnable: (e) => e.actions.toYfmCut.isEnable(),
};
exports.wNoteItemData = {
    id: action_names_1.ActionName.yfm_note,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'note'),
    icon: icons_1.icons.note,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Note),
    exec: (e) => e.actions.toYfmNote.run(),
    isActive: (e) => e.actions.toYfmNote.isActive(),
    isEnable: (e) => e.actions.toYfmNote.isEnable(),
};
exports.wTableItemData = {
    id: action_names_1.ActionName.table,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'table'),
    icon: icons_1.icons.table,
    exec: (e) => e.actions.createYfmTable.run(),
    isActive: (e) => e.actions.createYfmTable.isActive(),
    isEnable: (e) => e.actions.createYfmTable.isEnable(),
};
exports.wCodeItemData = {
    id: action_names_1.ActionName.code_inline,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'code_inline'),
    icon: icons_1.icons.code,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.Code),
    exec: (e) => e.actions.code.run(),
    isActive: (e) => e.actions.code.isActive(),
    isEnable: (e) => e.actions.code.isEnable(),
};
exports.wImageItemData = {
    id: action_names_1.ActionName.image,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'image'),
    icon: icons_1.icons.image,
    exec: (e) => e.actions.addImageWidget.run(),
    isActive: (e) => e.actions.addImageWidget.isActive(),
    isEnable: (e) => e.actions.addImageWidget.isEnable(),
};
exports.wFileItemData = {
    id: action_names_1.ActionName.file,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'file'),
    icon: icons_1.icons.file,
    exec: (e) => e.actions.addFile.run(),
    isActive: (e) => e.actions.addFile.isActive(),
    isEnable: (e) => e.actions.addFile.isEnable(),
};
exports.wTabsItemData = {
    id: action_names_1.ActionName.tabs,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'tabs'),
    icon: icons_1.icons.tabs,
    exec: (e) => e.actions.toYfmTabs.run(),
    isActive: (e) => e.actions.toYfmTabs.isActive(),
    isEnable: (e) => e.actions.toYfmTabs.isEnable(),
};
exports.wMathInlineItemData = {
    id: action_names_1.ActionName.math_inline,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'math_inline'),
    icon: icons_1.icons.functionInline,
    hint: () => `${hints_1.i18n.bind(null, 'math_hint')()} ${hints_1.i18n.bind(null, 'math_hint_katex')()}`,
    exec: (e) => e.actions.addMathInline.run(),
    isActive: (e) => e.actions.addMathInline.isActive(),
    isEnable: (e) => e.actions.addMathInline.isEnable(),
};
exports.wMathBlockItemData = {
    id: action_names_1.ActionName.math_block,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'math_block'),
    icon: icons_1.icons.functionBlock,
    hint: () => `${hints_1.i18n.bind(null, 'math_hint')()} ${hints_1.i18n.bind(null, 'math_hint_katex')()}`,
    exec: (e) => e.actions.toMathBlock.run(),
    isActive: (e) => e.actions.toMathBlock.isActive(),
    isEnable: (e) => e.actions.toMathBlock.isEnable(),
};
exports.wYfmHtmlBlockItemData = {
    id: action_names_1.ActionName.yfm_html_block,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'html'),
    icon: icons_1.icons.html,
    exec: (e) => e.actions.createYfmHtmlBlock.run(),
    isActive: (e) => e.actions.createYfmHtmlBlock.isActive(),
    isEnable: (e) => e.actions.createYfmHtmlBlock.isEnable(),
};
exports.wMermaidItemData = {
    id: action_names_1.ActionName.mermaid,
    type: types_1.ToolbarDataType.SingleButton,
    title: menubar_1.i18n.bind(null, 'mermaid'),
    icon: icons_1.icons.mermaid,
    exec: (e) => e.actions.createMermaid.run(),
    isActive: (e) => e.actions.createMermaid.isActive(),
    isEnable: (e) => e.actions.createMermaid.isEnable(),
};
exports.wCodeBlockItemData = {
    id: action_names_1.ActionName.code_block,
    title: menubar_1.i18n.bind(null, 'codeblock'),
    icon: icons_1.icons.codeBlock,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.CodeBlock),
    exec: (e) => e.actions.toCodeBlock.run(),
    isActive: (e) => e.actions.toCodeBlock.isActive(),
    isEnable: (e) => e.actions.toCodeBlock.isEnable(),
};
exports.wHruleItemData = {
    id: action_names_1.ActionName.horizontalrule,
    title: menubar_1.i18n.bind(null, 'hrule'),
    icon: icons_1.icons.horizontalRule,
    exec: (e) => e.actions.hRule.run(),
    isActive: (e) => e.actions.hRule.isActive(),
    isEnable: (e) => e.actions.hRule.isEnable(),
};
exports.wEmojiItemData = {
    id: action_names_1.ActionName.emoji,
    title: menubar_1.i18n.bind(null, 'emoji'),
    icon: icons_1.icons.emoji,
    exec: (e) => e.actions.openEmojiSuggest.run({}),
    isActive: (e) => e.actions.openEmojiSuggest.isActive(),
    isEnable: (e) => e.actions.openEmojiSuggest.isEnable(),
};
exports.wToggleHeadingFoldingItemData = {
    id: 'folding-heading',
    type: types_1.ToolbarDataType.SingleButton,
    icon: icons_1.icons.foldingHeading,
    title: () => (0, menubar_1.i18n)('folding-heading'),
    hint: () => (0, menubar_1.i18n)('folding-heading__hint'),
    isActive: (editor) => editor.actions.toggleHeadingFolding?.isActive() ?? false,
    isEnable: (editor) => editor.actions.toggleHeadingFolding?.isEnable() ?? false,
    exec: (editor) => editor.actions.toggleHeadingFolding.run(),
    condition: 'enabled',
};
exports.textContextItemData = {
    id: 'text',
    type: types_1.ToolbarDataType.ReactComponent,
    component: WToolbarTextSelect_1.WToolbarTextSelect,
    props: { disablePortal: true },
    width: 0,
    condition: ({ selection: { $from, $to }, schema }) => {
        if (!$from.sameParent($to))
            return false;
        const { parent } = $from;
        return parent.type === (0, extensions_1.pType)(schema) || parent.type === (0, extensions_1.headingType)(schema);
    },
};
exports.wMathListItem = {
    id: 'math',
    type: types_1.ToolbarDataType.ListButton,
    icon: icons_1.icons.functionInline,
    withArrow: true,
    title: menubar_1.i18n.bind(null, 'math'),
    data: [exports.wMathInlineItemData, exports.wMathBlockItemData],
};
exports.wBulletListItemData = {
    id: action_names_1.ActionName.bulletList,
    title: menubar_1.i18n.bind(null, 'ulist'),
    icon: icons_1.icons.bulletList,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.BulletList),
    exec: (e) => e.actions.toBulletList.run(),
    isActive: (e) => e.actions.toBulletList.isActive(),
    isEnable: (e) => e.actions.toBulletList.isEnable(),
};
exports.wOrderedListItemData = {
    id: action_names_1.ActionName.orderedList,
    title: menubar_1.i18n.bind(null, 'olist'),
    icon: icons_1.icons.orderedList,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.OrderedList),
    exec: (e) => e.actions.toOrderedList.run(),
    isActive: (e) => e.actions.toOrderedList.isActive(),
    isEnable: (e) => e.actions.toOrderedList.isEnable(),
};
exports.wSinkListItemData = {
    id: action_names_1.ActionName.sinkListItem,
    title: menubar_1.i18n.bind(null, 'list__action_sink'),
    hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
    icon: icons_1.icons.sink,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.SinkListItem),
    exec: (e) => e.actions.sinkListItem.run(),
    isActive: (e) => e.actions.sinkListItem.isActive(),
    isEnable: (e) => e.actions.sinkListItem.isEnable(),
};
exports.wLiftListItemData = {
    id: action_names_1.ActionName.liftListItem,
    title: menubar_1.i18n.bind(null, 'list__action_lift'),
    hintWhenDisabled: () => (0, menubar_1.i18n)('list_action_disabled'),
    icon: icons_1.icons.lift,
    hotkey: shortcuts_1.formatter.toView(shortcuts_1.Action.LiftListItem),
    exec: (e) => e.actions.liftListItem.run(),
    isActive: (e) => e.actions.liftListItem.isActive(),
    isEnable: (e) => e.actions.liftListItem.isEnable(),
};
exports.wListsListConfig = {
    icon: icons_1.icons.bulletList,
    withArrow: true,
    title: menubar_1.i18n.bind(null, 'list'),
    data: [exports.wBulletListItemData, exports.wOrderedListItemData, exports.wSinkListItemData, exports.wLiftListItemData],
};
exports.wListMoveListConfig = {
    icon: icons_1.icons.lift,
    withArrow: true,
    title: 'Move list item',
    data: [
        {
            id: action_names_1.ActionName.sinkListItem,
            title: 'Sink list item',
            icon: icons_1.icons.sink,
            exec: (e) => e.actions.sinkListItem.run(),
            isActive: (e) => e.actions.sinkListItem.isActive(),
            isEnable: (e) => e.actions.sinkListItem.isEnable(),
        },
        {
            id: action_names_1.ActionName.liftListItem,
            title: 'Lift list item',
            icon: icons_1.icons.lift,
            exec: (e) => e.actions.liftListItem.run(),
            isActive: (e) => e.actions.liftListItem.isActive(),
            isEnable: (e) => e.actions.liftListItem.isEnable(),
        },
    ],
};
exports.wCodeListConfig = {
    icon: icons_1.icons.code,
    withArrow: true,
    title: menubar_1.i18n.bind(null, 'code'),
    data: [exports.wCodeItemData, exports.wCodeBlockItemData],
};
exports.wMathListConfig = {
    icon: icons_1.icons.functionInline,
    withArrow: true,
    title: menubar_1.i18n.bind(null, 'math'),
    data: [exports.wMathInlineItemData, exports.wMathBlockItemData],
};
exports.wCommandMenuConfig = [
    w_heading_config_1.wTextItemData,
    w_heading_config_1.wHeading1ItemData,
    w_heading_config_1.wHeading2ItemData,
    w_heading_config_1.wHeading3ItemData,
    w_heading_config_1.wHeading4ItemData,
    w_heading_config_1.wHeading5ItemData,
    w_heading_config_1.wHeading6ItemData,
    exports.wBulletListItemData,
    exports.wOrderedListItemData,
    exports.wSinkListItemData,
    exports.wLiftListItemData,
    exports.wLinkItemData,
    exports.wQuoteItemData,
    exports.wNoteItemData,
    exports.wCutItemData,
    exports.wCodeBlockItemData,
    exports.wCheckboxItemData,
    exports.wTableItemData,
    exports.wImageItemData,
    exports.wHruleItemData,
    exports.wEmojiItemData,
    exports.wFileItemData,
    exports.wTabsItemData,
];
exports.wHiddenData = exports.wCommandMenuConfig;
exports.wHistoryGroupConfig = [exports.wUndoItemData, exports.wRedoItemData];
exports.wBiusGroupConfig = [
    exports.wBoldItemData,
    exports.wItalicItemData,
    exports.wUnderlineItemData,
    exports.wStrikethroughItemData,
    exports.wMonospaceItemData,
    exports.wMarkedItemData,
];
exports.wToolbarConfig = [
    [exports.wUndoItemData, exports.wRedoItemData],
    [
        exports.wBoldItemData,
        exports.wItalicItemData,
        exports.wUnderlineItemData,
        exports.wStrikethroughItemData,
        exports.wMonospaceItemData,
        exports.wMarkedItemData,
    ],
    [
        {
            id: 'heading',
            type: types_1.ToolbarDataType.ListButton,
            icon: icons_1.icons.headline,
            withArrow: true,
            title: menubar_1.i18n.bind(null, 'heading'),
            data: [
                w_heading_config_1.wTextItemData,
                w_heading_config_1.wHeading1ItemData,
                w_heading_config_1.wHeading2ItemData,
                w_heading_config_1.wHeading3ItemData,
                w_heading_config_1.wHeading4ItemData,
                w_heading_config_1.wHeading5ItemData,
                w_heading_config_1.wHeading6ItemData,
            ],
        },
        {
            id: 'list',
            type: types_1.ToolbarDataType.ListButton,
            icon: icons_1.icons.bulletList,
            withArrow: true,
            title: menubar_1.i18n.bind(null, 'list'),
            data: [exports.wBulletListItemData, exports.wOrderedListItemData, exports.wSinkListItemData, exports.wLiftListItemData],
        },
        {
            id: 'colorify',
            type: types_1.ToolbarDataType.ReactComponent,
            component: WToolbarColors_1.WToolbarColors,
            width: 42,
        },
        exports.wLinkItemData,
        exports.wNoteItemData,
        exports.wCutItemData,
        exports.wQuoteItemData,
        {
            id: 'code',
            type: types_1.ToolbarDataType.ListButton,
            icon: icons_1.icons.code,
            withArrow: true,
            title: menubar_1.i18n.bind(null, 'code'),
            data: [exports.wCodeItemData, exports.wCodeBlockItemData],
        },
    ],
    [exports.wImageItemData, exports.wFileItemData, exports.wTableItemData, exports.wCheckboxItemData],
];
exports.wSelectionMenuConfig = [
    [exports.wToggleHeadingFoldingItemData, exports.textContextItemData],
    [
        exports.wBoldItemData,
        exports.wItalicItemData,
        exports.wUnderlineItemData,
        exports.wStrikethroughItemData,
        exports.wMonospaceItemData,
        exports.wMarkedItemData,
        exports.wCodeItemData,
    ],
    [
        {
            id: 'colorify',
            type: types_1.ToolbarDataType.ReactComponent,
            component: WToolbarColors_1.WToolbarColors,
            props: { disablePortal: true },
            width: 42,
        },
        exports.wLinkItemData,
    ],
];
exports.wToolbarConfigByPreset = {
    zero: [[exports.wUndoItemData, exports.wRedoItemData]],
    commonmark: [
        [exports.wUndoItemData, exports.wRedoItemData],
        [exports.wBoldItemData, exports.wItalicItemData],
        [
            {
                id: 'heading',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.headline,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'heading'),
                data: [
                    w_heading_config_1.wTextItemData,
                    w_heading_config_1.wHeading1ItemData,
                    w_heading_config_1.wHeading2ItemData,
                    w_heading_config_1.wHeading3ItemData,
                    w_heading_config_1.wHeading4ItemData,
                    w_heading_config_1.wHeading5ItemData,
                    w_heading_config_1.wHeading6ItemData,
                ],
            },
            {
                id: 'list',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.bulletList,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'list'),
                data: [
                    exports.wBulletListItemData,
                    exports.wOrderedListItemData,
                    exports.wSinkListItemData,
                    exports.wLiftListItemData,
                ],
            },
            exports.wLinkItemData,
            exports.wQuoteItemData,
            {
                id: 'code',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.code,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'code'),
                data: [exports.wCodeItemData, exports.wCodeBlockItemData],
            },
        ],
    ],
    default: [
        [exports.wUndoItemData, exports.wRedoItemData],
        [exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData],
        [
            {
                id: 'heading',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.headline,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'heading'),
                data: [
                    w_heading_config_1.wTextItemData,
                    w_heading_config_1.wHeading1ItemData,
                    w_heading_config_1.wHeading2ItemData,
                    w_heading_config_1.wHeading3ItemData,
                    w_heading_config_1.wHeading4ItemData,
                    w_heading_config_1.wHeading5ItemData,
                    w_heading_config_1.wHeading6ItemData,
                ],
            },
            {
                id: 'list',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.bulletList,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'list'),
                data: [
                    exports.wBulletListItemData,
                    exports.wOrderedListItemData,
                    exports.wSinkListItemData,
                    exports.wLiftListItemData,
                ],
            },
            exports.wLinkItemData,
            exports.wQuoteItemData,
            {
                id: 'code',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.code,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'code'),
                data: [exports.wCodeItemData, exports.wCodeBlockItemData],
            },
        ],
    ],
    yfm: [
        [exports.wUndoItemData, exports.wRedoItemData],
        [
            exports.wBoldItemData,
            exports.wItalicItemData,
            exports.wUnderlineItemData,
            exports.wStrikethroughItemData,
            exports.wMonospaceItemData,
        ],
        [
            {
                id: 'heading',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.headline,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'heading'),
                data: [
                    w_heading_config_1.wTextItemData,
                    w_heading_config_1.wHeading1ItemData,
                    w_heading_config_1.wHeading2ItemData,
                    w_heading_config_1.wHeading3ItemData,
                    w_heading_config_1.wHeading4ItemData,
                    w_heading_config_1.wHeading5ItemData,
                    w_heading_config_1.wHeading6ItemData,
                ],
            },
            {
                id: 'list',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.bulletList,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'list'),
                data: [
                    exports.wBulletListItemData,
                    exports.wOrderedListItemData,
                    exports.wSinkListItemData,
                    exports.wLiftListItemData,
                ],
            },
            exports.wLinkItemData,
            exports.wNoteItemData,
            exports.wCutItemData,
            exports.wQuoteItemData,
            {
                id: 'code',
                type: types_1.ToolbarDataType.ListButton,
                icon: icons_1.icons.code,
                withArrow: true,
                title: menubar_1.i18n.bind(null, 'code'),
                data: [exports.wCodeItemData, exports.wCodeBlockItemData],
            },
        ],
        [exports.wImageItemData, exports.wFileItemData, exports.wTableItemData, exports.wCheckboxItemData],
    ],
    full: exports.wToolbarConfig.slice(),
};
exports.wCommandMenuConfigByPreset = {
    zero: [],
    commonmark: [
        w_heading_config_1.wTextItemData,
        w_heading_config_1.wHeading1ItemData,
        w_heading_config_1.wHeading2ItemData,
        w_heading_config_1.wHeading3ItemData,
        w_heading_config_1.wHeading4ItemData,
        w_heading_config_1.wHeading5ItemData,
        w_heading_config_1.wHeading6ItemData,
        exports.wBulletListItemData,
        exports.wOrderedListItemData,
        exports.wSinkListItemData,
        exports.wLiftListItemData,
        exports.wLinkItemData,
        exports.wQuoteItemData,
        exports.wCodeBlockItemData,
        exports.wHruleItemData,
    ],
    default: [
        w_heading_config_1.wTextItemData,
        w_heading_config_1.wHeading1ItemData,
        w_heading_config_1.wHeading2ItemData,
        w_heading_config_1.wHeading3ItemData,
        w_heading_config_1.wHeading4ItemData,
        w_heading_config_1.wHeading5ItemData,
        w_heading_config_1.wHeading6ItemData,
        exports.wBulletListItemData,
        exports.wOrderedListItemData,
        exports.wSinkListItemData,
        exports.wLiftListItemData,
        exports.wLinkItemData,
        exports.wQuoteItemData,
        exports.wCodeBlockItemData,
        exports.wHruleItemData,
    ],
    yfm: [
        w_heading_config_1.wTextItemData,
        w_heading_config_1.wHeading1ItemData,
        w_heading_config_1.wHeading2ItemData,
        w_heading_config_1.wHeading3ItemData,
        w_heading_config_1.wHeading4ItemData,
        w_heading_config_1.wHeading5ItemData,
        w_heading_config_1.wHeading6ItemData,
        exports.wBulletListItemData,
        exports.wOrderedListItemData,
        exports.wSinkListItemData,
        exports.wLiftListItemData,
        exports.wLinkItemData,
        exports.wQuoteItemData,
        exports.wNoteItemData,
        exports.wCutItemData,
        exports.wCodeBlockItemData,
        exports.wCheckboxItemData,
        exports.wTableItemData,
        exports.wImageItemData,
        exports.wHruleItemData,
        exports.wFileItemData,
        exports.wTabsItemData,
    ],
    full: [
        w_heading_config_1.wTextItemData,
        w_heading_config_1.wHeading1ItemData,
        w_heading_config_1.wHeading2ItemData,
        w_heading_config_1.wHeading3ItemData,
        w_heading_config_1.wHeading4ItemData,
        w_heading_config_1.wHeading5ItemData,
        w_heading_config_1.wHeading6ItemData,
        exports.wBulletListItemData,
        exports.wOrderedListItemData,
        exports.wSinkListItemData,
        exports.wLiftListItemData,
        exports.wLinkItemData,
        exports.wQuoteItemData,
        exports.wNoteItemData,
        exports.wCutItemData,
        exports.wCodeBlockItemData,
        exports.wCheckboxItemData,
        exports.wTableItemData,
        exports.wImageItemData,
        exports.wHruleItemData,
        exports.wEmojiItemData,
        exports.wFileItemData,
        exports.wTabsItemData,
    ],
};
exports.wHiddenDataByPreset = {
    zero: exports.wCommandMenuConfigByPreset.zero.slice(),
    commonmark: exports.wCommandMenuConfigByPreset.commonmark.slice(),
    default: exports.wCommandMenuConfigByPreset.default.slice(),
    yfm: exports.wCommandMenuConfigByPreset.yfm.slice(),
    full: exports.wCommandMenuConfigByPreset.full.slice(),
};
exports.wSelectionMenuConfigByPreset = {
    zero: [],
    commonmark: [
        [exports.textContextItemData],
        [exports.wBoldItemData, exports.wItalicItemData, exports.wCodeItemData],
        [exports.wLinkItemData],
    ],
    default: [
        [exports.textContextItemData],
        [exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData, exports.wCodeItemData],
        [exports.wLinkItemData],
    ],
    yfm: [
        [exports.textContextItemData],
        [exports.wBoldItemData, exports.wItalicItemData, exports.wStrikethroughItemData, exports.wMonospaceItemData, exports.wCodeItemData],
        [exports.wLinkItemData],
    ],
    full: exports.wSelectionMenuConfig.slice(),
};
//# sourceMappingURL=wysiwyg.js.map
