import { HidingMap } from './hidingMap.mjs';
import { IndexMap } from './indexMap.mjs';
import { LinkedPhysicalIndexToValueMap } from './linkedPhysicalIndexToValueMap.mjs';
import { PhysicalIndexToValueMap } from './physicalIndexToValueMap.mjs';
import { TrimmingMap } from './trimmingMap.mjs';
import { throwWithCause } from '../../helpers/errors.mjs';
export * from './indexesSequence.mjs';
export * from './utils/indexesSequence.mjs';
export { HidingMap, IndexMap, LinkedPhysicalIndexToValueMap, PhysicalIndexToValueMap, TrimmingMap };
const availableIndexMapTypes = new Map([
    [
        'hiding',
        HidingMap
    ],
    [
        'index',
        IndexMap
    ],
    [
        'linkedPhysicalIndexToValue',
        LinkedPhysicalIndexToValueMap
    ],
    [
        'physicalIndexToValue',
        PhysicalIndexToValueMap
    ],
    [
        'trimming',
        TrimmingMap
    ]
]);
/**
 * Creates and returns new IndexMap instance.
 *
 * @param {string} mapType The type of the map.
 * @param {*} [initValueOrFn=null] Initial value or function for index map.
 * @returns {IndexMap}
 */ export function createIndexMap(mapType, initValueOrFn = null) {
    if (!availableIndexMapTypes.has(mapType)) {
        throwWithCause(`The provided map type ("${mapType}") does not exist.`);
    }
    return new (availableIndexMapTypes.get(mapType))(initValueOrFn);
}
