"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resetHeading = void 0;
const BaseSchema_1 = require("../../base/BaseSchema/index.js");
const HeadingSpecs_1 = require("./HeadingSpecs/index.js");
const resetHeading = (state, dispatch, view) => {
    const { selection } = state;
    if (selection.empty &&
        selection.$from.parent.type === (0, HeadingSpecs_1.headingType)(state.schema) &&
        view?.endOfTextblock('backward', state)) {
        return (0, BaseSchema_1.toParagraph)(state, dispatch, view);
    }
    return false;
};
exports.resetHeading = resetHeading;
//# sourceMappingURL=commands.js.map
