"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeLink = void 0;
const prosemirror_commands_1 = require("prosemirror-commands");
const marks_1 = require("../../../utils/marks.js");
const LinkSpecs_1 = require("./LinkSpecs/index.js");
const removeLink = (state, dispatch) => {
    const linkMarkType = (0, LinkSpecs_1.linkType)(state.schema);
    if ((0, marks_1.isMarkActive)(state, linkMarkType))
        return (0, prosemirror_commands_1.toggleMark)(linkMarkType)(state, dispatch);
    return false;
};
exports.removeLink = removeLink;
//# sourceMappingURL=commands.js.map
