/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Endpoint } from "#endpoint/Endpoint.js";
import { EventEmitter, Observable } from "@matter/general";
import { Behavior } from "../../Behavior.js";
/**
 * This behavior indexes all descendents of a {@link Endpoint} by number.
 *
 * IndexBehavior should only be present on root and aggregator parts as its presence causes the endpoint's PartsList
 * attribute to reflect a flat namespace as required by the Matter standard.
 */
export declare class IndexBehavior extends Behavior {
    #private;
    static readonly id = "index";
    internal: IndexBehavior.Internal;
    readonly events: IndexBehavior.Events;
    static readonly early = true;
    initialize(): void;
    [Symbol.asyncDispose](): void;
    get partsById(): Record<string, Endpoint<import("../../../index.js").EndpointType.Empty>>;
    get partsByNumber(): Record<string, Endpoint<import("../../../index.js").EndpointType.Empty>>;
    /**
     * Retrieve a {@link Endpoint} by number.
     *
     * Note that {@link internal.partsByNumber} does not include {@link endpoint} but this method will return it if the
     * number matches.
     */
    forNumber(number: number): Endpoint<import("../../../index.js").EndpointType.Empty>;
}
export declare namespace IndexBehavior {
    class Internal {
        changeBroadcastPending?: boolean;
        /**
         * Map of ID to {@link Endpoint}.
         */
        partsById: Record<string, Endpoint>;
        /**
         * Map of number to {@link Endpoint}.
         */
        partsByNumber: Record<string, Endpoint>;
    }
    class Events extends EventEmitter {
        /**
         * Emitted when the index changes.
         */
        change: Observable<[], void>;
    }
}
//# sourceMappingURL=IndexBehavior.d.ts.map