"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const menu_button_1 = __importDefault(require("./menu-button"));
const HeadingSelect = (props) => {
    const { editor } = props;
    const headingLevels = [1, 2, 3, 4, 5, 6];
    // TODO: Replace with dropdown
    return (react_1.default.createElement(react_1.default.Fragment, null,
        headingLevels.map((level) => {
            const name = `heading.${level}`;
            return (react_1.default.createElement(menu_button_1.default, { editor: editor, key: name, name: name, onClick: () => editor.chain().focus().toggleHeading({ level }).run(), icon: `Number_${level}`, attributes: { level } }));
        }),
        react_1.default.createElement(menu_button_1.default, { editor: editor, name: "paragraph", onClick: () => editor.chain().focus().setParagraph().run(), icon: "Paragraph" })));
};
exports.default = HeadingSelect;
