"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.splitMarkForMoveEffects = exports.getAttach = exports.isMoveMark = void 0;
const utils_js_1 = require("./utils.js");
function isMoveMark(effect) {
    return (0, utils_js_1.isAttach)(effect) || (0, utils_js_1.isDetach)(effect);
}
exports.isMoveMark = isMoveMark;
function getAttach(effect) {
    switch (effect.type) {
        case "Insert":
            return effect;
        default:
            return undefined;
    }
}
exports.getAttach = getAttach;
function splitMarkForMoveEffects(mark, getLength) {
    const length = getLength(mark);
    return length < mark.count ? (0, utils_js_1.splitMark)(mark, length) : [mark];
}
exports.splitMarkForMoveEffects = splitMarkForMoveEffects;
//# sourceMappingURL=moveEffectTable.js.map