/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Model } from "../models/Model.js";
/**
 * An read-only array of models with support for efficient lookup by name and ID.
 *
 * Name search uses canonical camel case, so "FooBar", "fooBar" and "foo-bar" are considered equivalent.
 */
export interface ModelIndex<T extends Model = Model> extends ReadonlyArray<T> {
    /**
     * Retrieve a model for the given ID or name.
     *
     * Use the two-parameter version for indices that contain multiple model types.
     */
    for(key: number | string): T | undefined;
    /**
     * Retrieve a model of the specific type for the given ID or name.
     *
     * Name search uses canonical camel case.
     */
    for<M extends T>(key: number | string, type: Model.Type<M>): M | undefined;
    /**
     * Filter to a specific model subtype.
     */
    ofType<M extends T>(type: Model.Type<M>): M[];
}
/**
 * Implementation of {@link ModelIndex} used for initial creation.
 */
export declare class MutableModelIndex<T extends Model = Model> extends Array<T> implements ModelIndex {
    #private;
    for(key: number | string): T;
    for<M extends T>(key: number | string, type: Model.Type<M>): M;
    ofType<T extends Model.Type>(type: T): InstanceType<T>[];
}
//# sourceMappingURL=ModelIndex.d.ts.map