"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defineActions = defineActions;
exports.createToggleMarkAction = createToggleMarkAction;
const prosemirror_commands_1 = require("prosemirror-commands");
const marks_1 = require("./marks.js");
function defineActions(actions) {
    return actions;
}
function createToggleMarkAction(markType) {
    const command = (0, prosemirror_commands_1.toggleMark)(markType);
    return {
        isActive: (state) => Boolean((0, marks_1.isMarkActive)(state, markType)),
        isEnable: command,
        run: command,
    };
}
//# sourceMappingURL=actions.js.map
