/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ReadResult } from "#action/response/ReadResult.js";
import { SubscriptionId } from "#interaction/Subscription.js";
import { PeerAddress } from "#peer/PeerAddress.js";
import { Environment, Environmental, Lifetime } from "@matter/general";
import { ClientSubscription } from "./ClientSubscription.js";
import type { PeerSubscription } from "./PeerSubscription.js";
/**
 * A managed set of {@link ActiveSubscription} instances.
 */
export declare class ClientSubscriptions implements Lifetime.Owner {
    #private;
    constructor(lifetime: Lifetime.Owner);
    static [Environmental.create](env: Environment): ClientSubscriptions;
    join(...name: unknown[]): Lifetime;
    /**
     * Register a user-facing {@link ClientSubscription}.
     */
    addActive(subscription: ClientSubscription): void;
    /**
     * Register a {@link PeerSubscription}.
     */
    addPeer(subscription: PeerSubscription): void;
    /**
     * Retrieve a {@link PeerSubscription} by ID.
     */
    getPeer(address: PeerAddress, id: SubscriptionId): PeerSubscription | undefined;
    /**
     * Unregister a {@link PeerSubscription}.
     */
    delete(subscription: ClientSubscription): void;
    /**
     * Iterate over active subscriptions.
     */
    [Symbol.iterator](): SetIterator<ClientSubscription>;
    /**
     * Terminate all subscriptions.
     */
    close(): Promise<void>;
    /**
     * Restart the timeout timer for the current set of active subscriptions.
     */
    resetTimer(): void;
}
export declare namespace ClientSubscriptions {
    interface Listener {
        (reports: AsyncIterable<ReadResult.Chunk>): Promise<void>;
    }
}
//# sourceMappingURL=ClientSubscriptions.d.ts.map