/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ClusterType, EndpointNumber, GlobalAttributeNames } from "#types";
/**
 * A "specifier" addresses a specific element of the Matter data model in the context of a request.
 */
export declare namespace Specifier {
    /**
     * Clusters we designate with an object to convey structural and type information.  The second form of this union
     * allows for specification with a host object (such as a ClusterBehavior instance or class).
     */
    type Cluster = ClusterType | {
        cluster: ClusterType;
    };
    /**
     * You may address endpoints with a bare ID but the object form allows an "endpoint object" as input and optionally
     * conveys additional metadata.
     */
    type Endpoint = EndpointNumber | {
        number: EndpointNumber;
        versions?: Record<string, number>;
        minEvent?: number;
    };
    /**
     * An attribute specifier may be the name of a cluster attribute or the name of a cluster or global attribute.
     */
    type Attribute<C extends ClusterType = ClusterType> = ClusterType.Attribute | (string & keyof C["attributes"]) | GlobalAttributeNames<any>;
    /**
     * A command specifier may be the name of a cluster attribute or the name of a cluster command.
     */
    type Command<C extends ClusterType = ClusterType> = ClusterType.Command | (string & keyof C["commands"]);
    /**
     * An event specifier may be the name of a cluster event or an event object.
     */
    type Event<C extends ClusterType = ClusterType> = ClusterType.Event | (string & keyof C["events"]);
    /**
     * Extract a cluster type from a cluster specifier type.
     */
    type ClusterFor<T extends Cluster> = T extends ClusterType ? T : T extends {
        cluster: ClusterType;
    } ? T["cluster"] : never;
    /**
     * Extract a cluster type from a cluster specifier.
     */
    function clusterFor<const T extends Cluster>(specifier?: T): ClusterFor<T>;
    /**
     * Extract an attribute object from a cluster and attribute specifier.
     */
    function attributeFor(cluster: ClusterType | undefined, specifier: Specifier.Attribute): ClusterType.Attribute;
    /**
     * Extract a command type from a cluster type and command specifier.
     */
    type CommandFor<C extends ClusterType, CMD extends Specifier.Command<C>> = CMD extends string ? C["commands"][CMD] : CMD extends ClusterType.Command ? CMD : never;
    function commandFor<const C extends ClusterType, const CMD extends Specifier.Command<C>>(cluster: C | undefined, specifier: CMD): CommandFor<C, CMD>;
    /**
     * Extract an event object from a cluster and event specifier.
     */
    function eventFor(cluster: ClusterType | undefined, specifier: Specifier.Event): ClusterType.Event;
    /**
     * Extract the cluster type from a cluster request type.
     */
    type ClusterOf<T extends {
        cluster?: Cluster;
    }> = T extends {
        cluster: Specifier.Cluster;
    } ? Specifier.ClusterFor<T["cluster"]> : undefined;
    /**
     * Extract the cluster type from an element request.
     */
    function clusterOf<const T extends {
        cluster?: Cluster;
    }>(request: T): ClusterOf<T>;
    /**
     * Determine endpoint number for an object with an endpoint specifier.
     */
    function endpointIdOf<const T extends {
        endpoint?: Endpoint;
    }>(request: T): EndpointNumber | undefined;
}
export declare function toWildcardOrHexPath(name: string, value: number | bigint | undefined): string;
/**
 * Resolve a path into a human readable textual form for logging
 * TODO: Add a Diagnostic display formatter for this
 */
export declare function resolvePathForSpecifier<const C extends ClusterType>(location: {
    endpoint?: Specifier.Endpoint;
    cluster?: Specifier.Cluster;
    attribute?: Specifier.Attribute<Specifier.ClusterFor<C>>;
    event?: Specifier.Event<Specifier.ClusterFor<C>>;
    command?: Specifier.Command<Specifier.ClusterFor<C>>;
    isUrgent?: boolean;
    listIndex?: number | null;
}): string;
//# sourceMappingURL=Specifier.d.ts.map