"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get getDecreasedIndexes () {
        return getDecreasedIndexes;
    },
    get getIncreasedIndexes () {
        return getIncreasedIndexes;
    }
});
const _array = require("../../../helpers/array");
function getDecreasedIndexes(indexedValues, removedIndexes) {
    return (0, _array.arrayMap)(indexedValues, (index)=>index - removedIndexes.filter((removedIndex)=>removedIndex < index).length);
}
function getIncreasedIndexes(indexedValues, insertedIndexes) {
    const firstInsertedIndex = insertedIndexes[0];
    const amountOfIndexes = insertedIndexes.length;
    return (0, _array.arrayMap)(indexedValues, (index)=>{
        if (index >= firstInsertedIndex) {
            return index + amountOfIndexes;
        }
        return index;
    });
}
