// @ts-ignore // TODO: fix cjs build
import { findParentNodeOfType, removeParentNodeOfType } from 'prosemirror-utils';
import { yfmTableType } from "../utils.js";
export const removeYfmTable = (state, dispatch) => {
    const parentTable = findParentNodeOfType(yfmTableType(state.schema))(state.selection);
    if (!parentTable)
        return false;
    dispatch?.(removeParentNodeOfType(parentTable.node.type)(state.tr));
    return true;
};
//# sourceMappingURL=remove-table.js.map
