import { setBlockType } from 'prosemirror-commands';
import { headingLevelAttr } from "./const.js";
import { hasParentHeading } from "./utils.js";
export const headingAction = (nodeType, level) => {
    const cmd = setBlockType(nodeType, { [headingLevelAttr]: level });
    return {
        isActive: hasParentHeading(level),
        isEnable: cmd,
        run: cmd,
    };
};
//# sourceMappingURL=actions.js.map
