/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { SupportedBehaviors } from "../properties/SupportedBehaviors.js";
import { SupportedClientClusters } from "../properties/SupportedClientClusters.js";
import { EndpointType } from "./EndpointType.js";
/**
 * A MutableEndpoint is an EndpointType with factory functions that make it convenient to reconfigure the endpoint.
 *
 * Note: mandatory client clusters from `requirements.client.mandatory` are auto-registered into the
 * `clientClusters` slot at runtime but do not surface in the static type — the slot type reflects only
 * explicitly-supplied `clientClusters` or `.withClientClusters(...)` additions.
 */
export interface MutableEndpoint extends EndpointType {
    /**
     * Access default state values.
     */
    defaults: {};
    /**
     * Define an endpoint like this one with different defaults.  Only updates values present in the input object.
     */
    set(defaults: {}): MutableEndpoint;
    /**
     * Define an endpoint like this one with additional and/or replacement server behaviors.
     */
    withBehaviors(...behaviors: SupportedBehaviors.List): MutableEndpoint;
    /**
     * Define an endpoint like this one with additional and/or replacement client cluster declarations.
     */
    withClientClusters(...clientClusters: SupportedClientClusters.List): MutableEndpoint;
    /**
     * Route server behaviors to the behaviors slot and ClientBehavior arguments to the clientClusters slot.
     */
    with(...behaviors: SupportedBehaviors.List): MutableEndpoint;
}
/**
 * Define a new type of endpoint with factory functions.
 */
export declare function MutableEndpoint<const T extends EndpointType.Options>(options: T): MutableEndpoint.With<EndpointType.For<T>, T["behaviors"] extends SupportedBehaviors ? T["behaviors"] : {}, T["clientClusters"] extends SupportedClientClusters ? T["clientClusters"] : {}>;
export declare namespace MutableEndpoint {
    type With<B extends EndpointType, SB extends SupportedBehaviors, SC extends SupportedClientClusters = B["clientClusters"]> = Omit<B, "behaviors" | "clientClusters" | "defaults" | "set" | "with"> & {
        behaviors: B["behaviors"] & SB;
        clientClusters: SC;
        /**
         * Access default state values.
         */
        defaults: SupportedBehaviors.StateOf<SB>;
        /**
         * Define an endpoint like this one with different defaults.  Only updates values present in the input object.
         */
        set(defaults: SupportedBehaviors.InputStateOf<SB>): With<B, SB, SC>;
        /**
         * Define an endpoint like this one with additional and/or replacement server behaviors.
         */
        withBehaviors<const BL extends SupportedBehaviors.List>(...behaviors: BL): With<B, SupportedBehaviors.With<SB, BL>, SC>;
        /**
         * Define an endpoint like this one with additional and/or replacement client cluster declarations.
         */
        withClientClusters<const CL extends SupportedClientClusters.List>(...clientClusters: CL): With<B, SB, SupportedClientClusters.With<SC, CL>>;
        /**
         * Define an endpoint like this one with additional behaviors. ClientBehavior arguments are routed to the
         * clientClusters slot at runtime; the static type widens them like ordinary server behaviors. For typed access
         * to the resulting clientClusters slot, use {@link withClientClusters} instead.
         */
        with<const BL extends SupportedBehaviors.List>(...behaviors: BL): With<B, SupportedBehaviors.With<SB, BL>, SC>;
    };
}
//# sourceMappingURL=MutableEndpoint.d.ts.map