"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PhysicalIndexToValueMap", {
    enumerable: true,
    get: function() {
        return PhysicalIndexToValueMap;
    }
});
const _indexMap = require("./indexMap");
const _physicallyIndexed = require("./utils/physicallyIndexed");
class PhysicalIndexToValueMap extends _indexMap.IndexMap {
    /**
   * Add values to list and reorganize.
   *
   * @private
   * @param {number} insertionIndex Position inside the list.
   * @param {Array} insertedIndexes List of inserted indexes.
   */ insert(insertionIndex, insertedIndexes) {
        this.indexedValues = (0, _physicallyIndexed.getListWithInsertedItems)(this.indexedValues, insertionIndex, insertedIndexes, this.initValueOrFn);
        super.insert(insertionIndex, insertedIndexes);
    }
    /**
   * Remove values from the list and reorganize.
   *
   * @private
   * @param {Array} removedIndexes List of removed indexes.
   */ remove(removedIndexes) {
        this.indexedValues = (0, _physicallyIndexed.getListWithRemovedItems)(this.indexedValues, removedIndexes);
        super.remove(removedIndexes);
    }
}
