/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { ClusterType, ClusterTyping } from "@matter/types";
/**
 * @see {@link ClusterTyping}
 */
export type ClusterInterface = ClusterTyping;
export declare namespace ClusterInterface {
    const Empty: ClusterInterface;
    type Empty = ClusterInterface;
    type Component = ClusterType.Component;
    type InterfaceOf<B> = B extends {
        Interface: infer I extends ClusterInterface;
    } ? I : ClusterInterface;
    type MethodsOf<I extends ClusterInterface> = InterfaceMethodsOf<I, ClusterType.SupportedFeaturesOf<I>>;
    /**
     * All methods from all components, regardless of feature selection.
     */
    type AllMethodsOf<I extends ClusterInterface> = ClusterInterface extends I ? {} : AppliedMethodsOf<ComponentsOf<I>>;
    type ComponentsOf<I extends ClusterInterface> = I extends {
        Components: infer C extends Component[];
    } ? C : [];
    type InterfaceMethodsOf<I extends ClusterInterface, S> = ClusterInterface extends I ? {} : AppliedMethodsOf<ApplicableComponents<ComponentsOf<I>, S>>;
    type AppliedMethodsOf<CA extends Component[]> = CA extends [
        infer C extends Component,
        ...infer R extends Component[]
    ] ? (C extends {
        commands: infer M;
    } ? M : {}) & AppliedMethodsOf<R> : {};
    type ApplicableComponents<CA extends Component[], S> = CA extends [
        infer C extends Component,
        ...infer R extends Component[]
    ] ? S extends C["flags"] ? [C, ...ApplicableComponents<R, S>] : ApplicableComponents<R, S> : [];
}
//# sourceMappingURL=ClusterInterface.d.ts.map