/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
import { NodeId } from "@matter/main";
import { ClusterClientObj } from "@matter/main/protocol";
import { ClusterId, ClusterType, EndpointNumber } from "@matter/main/types";
import { InteractionClient } from "@project-chip/matter.js/cluster";
import { NodeStates, PairedNode } from "@project-chip/matter.js/device";
import { AttributeDataCache } from "./AttributeDataCache.js";
/**
 * Manages node storage and provides access to nodes and their clients.
 *
 * This class handles:
 * - Storage of PairedNode instances
 * - Node retrieval and existence checking
 * - Access to interaction clients and cluster clients
 * - Attribute data caching
 * - Connection state tracking for availability debouncing
 */
export declare class Nodes {
    #private;
    /**
     * Get the attribute cache instance.
     */
    get attributeCache(): AttributeDataCache;
    /**
     * Get all node IDs.
     */
    getIds(): NodeId[];
    /**
     * Get a node by ID.
     * @throws ServerError if node not found
     */
    get(nodeId: NodeId): PairedNode;
    /**
     * Check if a node exists.
     */
    has(nodeId: NodeId): boolean;
    /**
     * Add or update a node in storage.
     */
    set(nodeId: NodeId, node: PairedNode): void;
    /**
     * Remove a node from storage and clear its attribute cache and state tracking.
     */
    delete(nodeId: NodeId): void;
    /**
     * Get the previous connection state for a node.
     */
    getPreviousState(nodeId: NodeId): NodeStates | undefined;
    /**
     * Update the previous connection state for a node.
     * Call this after processing a state change to track state transitions.
     */
    setPreviousState(nodeId: NodeId, state: NodeStates): void;
    /**
     * Determine if a node should be considered available based on its connection state.
     * Uses debouncing logic similar to Python Matter Server:
     * - Connected: available
     * - Reconnecting when previously Connected: still available (debouncing)
     * - WaitingForDeviceDiscovery or Disconnected: unavailable
     *
     * @param currentState Current connection state
     * @param previousState Previous connection state (undefined if first state change)
     * @returns true if node should be considered available
     */
    isNodeAvailable(currentState: NodeStates, previousState?: NodeStates): boolean;
    /**
     * Check if a node is available based on its current and previous connection state.
     * Uses debouncing: Reconnecting from Connected is still considered available.
     */
    isAvailable(nodeId: NodeId): boolean;
    /**
     * Get the interaction client for a node.
     */
    interactionClientFor(nodeId: NodeId): InteractionClient;
    /**
     * Get a cluster client by cluster ID for a specific endpoint on a node.
     * @throws Error if endpoint or cluster not found
     * TODO: Migrate to new node API
     */
    clusterClientByIdFor(nodeId: NodeId, endpointId: EndpointNumber, clusterId: ClusterId): ClusterClientObj<any>;
    /**
     * Get a typed cluster client for a specific endpoint on a node.
     */
    clusterClientFor<const T extends ClusterType>(nodeId: NodeId, endpointId: EndpointNumber, cluster: T): ClusterClientObj<T["Typing"]>;
}
//# sourceMappingURL=Nodes.d.ts.map