/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Message } from "#codec/MessageCodec.js";
import { Fabric as RealFabric } from "#fabric/Fabric.js";
import { NodeSession as RealNodeSession } from "#session/NodeSession.js";
import { Session } from "#session/Session.js";
import { AsyncObservable, Bytes, Channel, ChannelType, Crypto, IpNetworkChannel, MaybePromise, Observable, ServerAddressUdp } from "@matter/general";
import { Status } from "@matter/types";
import { MessageChannel as RealMessageChannel } from "./MessageChannel.js";
import { MessageExchange, MessageExchangeContext } from "./MessageExchange.js";
export declare namespace ProtocolMocks {
    /**
     * A fabric that will fill any fields not provided with placeholder values.
     */
    class Fabric extends RealFabric {
        constructor(config?: Partial<RealFabric.SyncConfig>, crypto?: Crypto);
    }
    namespace Fabric {
        const defaults: RealFabric.SyncConfig;
    }
    /**
     * A mock {@link NodeSession} that supports functional tests without full mock networking.
     */
    class NodeSession extends RealNodeSession {
        constructor(config?: NodeSession.Config);
        static create(config: NodeSession.CreateConfig): Promise<RealNodeSession>;
    }
    namespace NodeSession {
        type Config = Partial<RealNodeSession.Config> & MockSessionConfig;
        type CreateConfig = Partial<RealNodeSession.CreateConfig & MockSessionConfig>;
    }
    /**
     * A mock channel that can act as a placeholder without full mock networking.
     */
    class NetworkChannel implements IpNetworkChannel<Bytes> {
        #private;
        maxPayloadSize: number;
        isReliable: boolean;
        supportsLargeMessages: boolean;
        name: string;
        type: ChannelType;
        networkAddressChanged: Observable<[ServerAddressUdp], void>;
        constructor(config: MockNetworkConfig);
        get networkAddress(): ServerAddressUdp;
        set networkAddress(networkAddress: ServerAddressUdp);
        send(): Promise<void>;
        close(): Promise<void>;
    }
    /**
     * A mock message channel that stores outbound messages for later analysis.
     */
    class MessageChannel extends RealMessageChannel {
        #private;
        constructor(config?: {
            channel?: Channel<Bytes>;
            session?: Session;
            onClose?: () => MaybePromise<void>;
            index?: number;
            fabricIndex?: number;
        });
        send(message: Message): Promise<void>;
        read(): Promise<Message>;
        get readReady(): AsyncObservable<[], void>;
    }
    /**
     * A mock message exchange that "transports" messages via internal queues.
     */
    class Exchange extends MessageExchange {
        #private;
        constructor(config?: Omit<Partial<MessageExchange.Config>, "context"> & MockSessionConfig & {
            context?: Partial<MessageExchangeContext>;
            fabric?: Fabric;
        });
        /**
         * Enqueue a mock response.
         */
        write(message: Message): Promise<void>;
        /**
         * Enqueue a mock status response.
         */
        writeStatus(status?: Status): Promise<void>;
        /**
         * Wait for a mock request.
         */
        read(): Promise<Message>;
        /**
         * Emits when read() won't block.
         */
        get readReady(): AsyncObservable<[], void>;
        nextMessage(): Promise<Message>;
    }
    interface MockNetworkConfig {
        index?: number;
        maxPayloadSize?: number;
    }
    interface MockSessionConfig extends MockNetworkConfig {
        fabricIndex?: number;
    }
}
//# sourceMappingURL=ProtocolMocks.d.ts.map