/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
import type { BorderRouterEntry } from "@matter-server/ws-client";
import { Bytes, type DnsRecord, DnsRecordType, Environment } from "@matter/main";
interface DnssdRecordLike {
    recordType: DnsRecordType;
    name: string;
    value: unknown;
}
interface DnssdParametersLike extends ReadonlyMap<string, string> {
    raw(key: string): Bytes | undefined;
}
interface DnssdNameLike {
    readonly qname: string;
    readonly parameters: DnssdParametersLike;
    readonly records: Iterable<DnssdRecordLike>;
    readonly isDiscovered: boolean;
    on(observer: NameObserver): void;
    off(observer: NameObserver): void;
}
interface DnssdNamesFiltersLike {
    add(filter: (record: DnsRecord) => boolean, names: Iterable<string> | "all"): unknown;
    delete(filter: (record: DnsRecord) => boolean): unknown;
}
interface DiscoveredObservableLike {
    on(observer: DiscoveredObserver): void;
    off(observer: DiscoveredObserver): void;
}
interface SolicitorLike {
    solicit(solicitation: {
        name: DnssdNameLike;
        recordTypes: DnsRecordType[];
    }): void;
}
interface DnssdNamesLike {
    readonly filters: DnssdNamesFiltersLike;
    readonly discovered: DiscoveredObservableLike;
    readonly solicitor: SolicitorLike;
    get(qname: string): DnssdNameLike;
    maybeGet(qname: string): DnssdNameLike | undefined;
}
type DiscoveredObserver = (name: DnssdNameLike) => void;
type NameObserver = (changes: {
    name: DnssdNameLike;
    updated?: unknown[];
    deleted?: unknown[];
}) => void;
/**
 * Passive Thread Border Router discovery via mDNS.
 *
 * Subscribes to `_meshcop._udp.local` and `_trel._udp.local`, builds a per-extended-address
 * registry, and exposes the current entries through {@link list}. Owned by {@link MatterController}.
 */
export declare class BorderRouterDiscovery {
    #private;
    constructor(env: Environment, names?: DnssdNamesLike);
    start(): Promise<void>;
    stop(): Promise<void>;
    list(): BorderRouterEntry[];
    get(extAddressHex: string): BorderRouterEntry | undefined;
}
export {};
//# sourceMappingURL=BorderRouterDiscovery.d.ts.map