"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.full = exports.yfm = exports.defaultPreset = exports.commonmark = exports.zero = void 0;
const action_names_1 = require("../../bundle/config/action-names.js");
const constants_1 = require("./constants.js");
const items_1 = require("./items.js");
// presets
exports.zero = {
    items: {
        [action_names_1.ActionName.undo]: {
            view: items_1.undoItemView,
            wysiwyg: items_1.undoItemWysiwyg,
            markup: items_1.undoItemMarkup,
        },
        [action_names_1.ActionName.redo]: {
            view: items_1.redoItemView,
            wysiwyg: items_1.redoItemWysiwyg,
            markup: items_1.redoItemMarkup,
        },
    },
    orders: {
        [constants_1.ToolbarName.wysiwygMain]: [[action_names_1.ActionName.undo, action_names_1.ActionName.redo]],
        [constants_1.ToolbarName.markupMain]: [[action_names_1.ActionName.undo, action_names_1.ActionName.redo]],
    },
};
exports.commonmark = {
    items: {
        ...exports.zero.items,
        [action_names_1.ActionName.bold]: {
            view: items_1.boldItemView,
            wysiwyg: items_1.boldItemWysiwyg,
            markup: items_1.boldItemMarkup,
        },
        [action_names_1.ActionName.italic]: {
            view: items_1.italicItemView,
            wysiwyg: items_1.italicItemWysiwyg,
            markup: items_1.italicItemMarkup,
        },
        [constants_1.ListName.heading]: {
            view: items_1.headingListItemView,
        },
        [action_names_1.ActionName.paragraph]: {
            view: items_1.paragraphItemView,
            wysiwyg: items_1.paragraphItemWisywig,
            markup: items_1.paragraphItemMarkup,
        },
        [action_names_1.ActionName.heading1]: {
            view: items_1.heading1ItemView,
            wysiwyg: items_1.heading1ItemWysiwyg,
            markup: items_1.heading1ItemMarkup,
        },
        [action_names_1.ActionName.heading2]: {
            view: items_1.heading2ItemView,
            wysiwyg: items_1.heading2ItemWysiwyg,
            markup: items_1.heading2ItemMarkup,
        },
        [action_names_1.ActionName.heading3]: {
            view: items_1.heading3ItemView,
            wysiwyg: items_1.heading3ItemWysiwyg,
            markup: items_1.heading3ItemMarkup,
        },
        [action_names_1.ActionName.heading4]: {
            view: items_1.heading4ItemView,
            wysiwyg: items_1.heading4ItemWysiwyg,
            markup: items_1.heading4ItemMarkup,
        },
        [action_names_1.ActionName.heading5]: {
            view: items_1.heading5ItemView,
            wysiwyg: items_1.heading5ItemWysiwyg,
            markup: items_1.heading5ItemMarkup,
        },
        [action_names_1.ActionName.heading6]: {
            view: items_1.heading6ItemView,
            wysiwyg: items_1.heading6ItemWysiwyg,
            markup: items_1.heading6ItemMarkup,
        },
        [constants_1.ListName.lists]: {
            view: items_1.listsListItemView,
        },
        [action_names_1.ActionName.bulletList]: {
            view: items_1.bulletListItemView,
            wysiwyg: items_1.bulletListItemWysiwyg,
            markup: items_1.bulletListItemMarkup,
        },
        [action_names_1.ActionName.orderedList]: {
            view: items_1.orderedListItemView,
            wysiwyg: items_1.orderedListItemWysiwyg,
            markup: items_1.orderedListItemMarkup,
        },
        [action_names_1.ActionName.sinkListItem]: {
            view: items_1.sinkListItemView,
            wysiwyg: items_1.sinkListItemWysiwyg,
            markup: items_1.sinkListItemMarkup,
        },
        [action_names_1.ActionName.liftListItem]: {
            view: items_1.liftListItemView,
            wysiwyg: items_1.liftListItemWysiwyg,
            markup: items_1.liftListItemMarkup,
        },
        [action_names_1.ActionName.link]: {
            view: items_1.linkItemView,
            wysiwyg: items_1.linkItemWysiwyg,
            markup: items_1.linkItemMarkup,
        },
        [action_names_1.ActionName.quote]: {
            view: items_1.quoteItemView,
            wysiwyg: items_1.quoteItemWysiwyg,
            markup: items_1.quoteItemMarkup,
        },
        [constants_1.ListName.code]: {
            view: items_1.codeBlocksListItemView,
        },
        [action_names_1.ActionName.codeInline]: {
            view: items_1.codeItemView,
            wysiwyg: items_1.codeItemWysiwyg,
            markup: items_1.codeItemMarkup,
        },
        [action_names_1.ActionName.codeBlock]: {
            view: items_1.codeBlockItemView,
            wysiwyg: items_1.codeBlockItemWysiwyg,
            markup: items_1.codeBlockItemMarkup,
        },
        [action_names_1.ActionName.horizontalRule]: {
            view: items_1.hruleItemView,
            wysiwyg: items_1.hruleItemWysiwyg,
            markup: items_1.hruleItemMarkup,
        },
    },
    orders: {
        [constants_1.ToolbarName.wysiwygMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
        ],
        [constants_1.ToolbarName.markupMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
        ],
        [constants_1.ToolbarName.wysiwygHidden]: [[action_names_1.ActionName.horizontalRule]],
        [constants_1.ToolbarName.markupHidden]: [[action_names_1.ActionName.horizontalRule]],
    },
};
exports.defaultPreset = {
    items: {
        ...exports.commonmark.items,
        [action_names_1.ActionName.strike]: {
            view: items_1.strikethroughItemView,
            wysiwyg: items_1.strikethroughItemWysiwyg,
            markup: items_1.strikethroughItemMarkup,
        },
    },
    orders: {
        [constants_1.ToolbarName.wysiwygMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.strike],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
        ],
        [constants_1.ToolbarName.markupMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.strike],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
        ],
        [constants_1.ToolbarName.wysiwygHidden]: [[action_names_1.ActionName.horizontalRule]],
        [constants_1.ToolbarName.markupHidden]: [[action_names_1.ActionName.horizontalRule]],
    },
};
exports.yfm = {
    items: {
        ...exports.defaultPreset.items,
        [action_names_1.ActionName.underline]: {
            view: items_1.underlineItemView,
            wysiwyg: items_1.underlineItemWysiwyg,
            markup: items_1.underlineItemMarkup,
        },
        [action_names_1.ActionName.mono]: {
            view: items_1.monospaceItemView,
            wysiwyg: items_1.monospaceItemWysiwyg,
            markup: items_1.monospaceItemMarkup,
        },
        [action_names_1.ActionName.note]: {
            view: items_1.noteItemView,
            wysiwyg: items_1.noteItemWysiwyg,
            markup: items_1.noteItemMarkup,
        },
        [action_names_1.ActionName.cut]: {
            view: items_1.cutItemView,
            wysiwyg: items_1.cutItemWysiwyg,
            markup: items_1.cutItemMarkup,
        },
        [action_names_1.ActionName.image]: {
            view: items_1.imageItemView,
            wysiwyg: items_1.imageItemWysiwyg,
        },
        [action_names_1.ActionName.imagePopup]: {
            view: items_1.imagePopupItemView,
            markup: items_1.imageItemMarkup,
        },
        [action_names_1.ActionName.file]: {
            view: items_1.fileItemView,
            wysiwyg: items_1.fileItemWysiwyg,
        },
        [action_names_1.ActionName.filePopup]: {
            view: items_1.filePopupItemView,
            markup: items_1.fileItemMarkup,
        },
        [action_names_1.ActionName.table]: {
            view: items_1.tableItemView,
            wysiwyg: items_1.tableItemWysiwyg,
            markup: items_1.tableItemMarkup,
        },
        [action_names_1.ActionName.checkbox]: {
            view: items_1.checkboxItemView,
            wysiwyg: items_1.checkboxItemWysiwyg,
            markup: items_1.checkboxItemMarkup,
        },
        [action_names_1.ActionName.tabs]: {
            view: items_1.tabsItemView,
            wysiwyg: items_1.tabsItemWysiwyg,
            markup: items_1.tabsItemMarkup,
        },
    },
    orders: {
        [constants_1.ToolbarName.wysiwygMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.underline, action_names_1.ActionName.strike, action_names_1.ActionName.mono],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.note,
                action_names_1.ActionName.cut,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
            [action_names_1.ActionName.image, action_names_1.ActionName.file, action_names_1.ActionName.table, action_names_1.ActionName.checkbox],
        ],
        [constants_1.ToolbarName.markupMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.underline, action_names_1.ActionName.strike, action_names_1.ActionName.mono],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.link,
                action_names_1.ActionName.note,
                action_names_1.ActionName.cut,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
            [action_names_1.ActionName.imagePopup, action_names_1.ActionName.filePopup, action_names_1.ActionName.table, action_names_1.ActionName.checkbox],
        ],
        [constants_1.ToolbarName.wysiwygHidden]: [[action_names_1.ActionName.horizontalRule, action_names_1.ActionName.tabs]],
        [constants_1.ToolbarName.markupHidden]: [[action_names_1.ActionName.horizontalRule, action_names_1.ActionName.tabs]],
    },
};
exports.full = {
    items: {
        ...exports.yfm.items,
        [action_names_1.ActionName.mark]: {
            view: items_1.markedItemView,
            wysiwyg: items_1.markedItemWysiwyg,
            markup: items_1.markedItemMarkup,
        },
        [action_names_1.ActionName.colorify]: {
            view: items_1.colorifyItemView,
            wysiwyg: items_1.colorifyItemWysiwyg,
            markup: items_1.colorifyItemMarkup,
        },
        [action_names_1.ActionName.emoji]: {
            view: items_1.emojiItemView,
            wysiwyg: items_1.emojiItemWysiwyg,
            markup: items_1.emojiItemMarkup,
        },
    },
    orders: {
        [constants_1.ToolbarName.wysiwygMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.underline, action_names_1.ActionName.strike, action_names_1.ActionName.mono, action_names_1.ActionName.mark],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.colorify,
                action_names_1.ActionName.link,
                action_names_1.ActionName.note,
                action_names_1.ActionName.cut,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
            [action_names_1.ActionName.image, action_names_1.ActionName.file, action_names_1.ActionName.table, action_names_1.ActionName.checkbox],
        ],
        [constants_1.ToolbarName.markupMain]: [
            [action_names_1.ActionName.undo, action_names_1.ActionName.redo],
            [action_names_1.ActionName.bold, action_names_1.ActionName.italic, action_names_1.ActionName.underline, action_names_1.ActionName.strike, action_names_1.ActionName.mono, action_names_1.ActionName.mark],
            [
                {
                    id: constants_1.ListName.heading,
                    items: [
                        action_names_1.ActionName.paragraph,
                        action_names_1.ActionName.heading1,
                        action_names_1.ActionName.heading2,
                        action_names_1.ActionName.heading3,
                        action_names_1.ActionName.heading4,
                        action_names_1.ActionName.heading5,
                        action_names_1.ActionName.heading6,
                    ],
                },
                {
                    id: constants_1.ListName.lists,
                    items: [
                        action_names_1.ActionName.bulletList,
                        action_names_1.ActionName.orderedList,
                        action_names_1.ActionName.sinkListItem,
                        action_names_1.ActionName.liftListItem,
                    ],
                },
                action_names_1.ActionName.colorify,
                action_names_1.ActionName.link,
                action_names_1.ActionName.note,
                action_names_1.ActionName.cut,
                action_names_1.ActionName.quote,
                {
                    id: constants_1.ListName.code,
                    items: [action_names_1.ActionName.codeInline, action_names_1.ActionName.codeBlock],
                },
            ],
            [action_names_1.ActionName.imagePopup, action_names_1.ActionName.filePopup, action_names_1.ActionName.table, action_names_1.ActionName.checkbox],
        ],
        [constants_1.ToolbarName.wysiwygHidden]: [[action_names_1.ActionName.horizontalRule, action_names_1.ActionName.emoji, action_names_1.ActionName.tabs]],
        [constants_1.ToolbarName.markupHidden]: [[action_names_1.ActionName.horizontalRule, action_names_1.ActionName.emoji, action_names_1.ActionName.tabs]],
    },
};
//# sourceMappingURL=presets.js.map
