/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Item
 */
/* eslint-disable deprecation/deprecation */
/** Contains a map of Items.
 * @public
 * @deprecated in 4.15.0. Map for deprecated {@link ItemDefBase} class instances. Use `Map` to store your objects.
 */
export class ItemMap extends Map {
    constructor(items) {
        super();
        if (items && typeof items === "object")
            this.addItems(items);
    }
    addItem(item) {
        this.set(item.id, item);
    }
    addItems(items) {
        items.forEach((item) => {
            this.set(item.id, item);
        });
    }
}
/** Contains a list of Items.
 * @public
 * @deprecated in 4.15.0. List of deprecated {@link ItemDefBase} class instances. Use `Array` to store your objects.
 */
export class ItemList extends Array {
    constructor(items) {
        super();
        if (items && typeof items === "object")
            this.addItems(items);
    }
    addItem(item) {
        this.push(item);
    }
    addItems(items) {
        items.forEach((item) => {
            this.push(item);
        });
    }
    get items() {
        return this;
    }
}
//# sourceMappingURL=ItemMap.js.map