/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Discovery } from "./Discovery.js";
/**
 * Base class for discovery flows that run parallel PASE establishments with a first-to-win race gate.
 *
 * Subclasses override {@link onDiscovered} to launch their specific PASE-time action via
 * {@link registerAttempt}, providing:
 *  - a {@code factory} that creates the PASE attempt and accepts the {@code winOnPase} gate callback,
 *  - an {@code extractWinner} to pull the result value from the settled promise.
 *
 * Attempts are staggered: the first starts immediately, each subsequent one waits an additional
 * {@link CROSS_DEVICE_STAGGER_DELAY}.  When {@code winOnPase} is called, the internal abort signal fires,
 * which cancels any pending stagger sleeps so that no further attempts are started.
 */
export declare abstract class ParallelPaseDiscovery<W> extends Discovery<W> {
    #private;
    protected get abortSignal(): AbortSignal;
    protected get paseWon(): boolean;
    /** Label used in the aggregate error when awaiting candidate cleanup. */
    protected abstract get cleanupLabel(): string;
    /** Error message prefix used when no winner was established. */
    protected abstract get failureMessage(): string;
    /**
     * Registers a parallel PASE attempt for the given node.
     *
     * @param factory Produces the attempt promise.  Receives a {@code winOnPase} callback that the implementation
     *   passes as the {@code continueXxx} option to the underlying PASE/commissioning call.  When invoked, it
     *   performs the race-gate logic and returns true if this attempt wins, false if another already won.
     * @param extractWinner Extracts the winner value from the settled attempt result.  Called only for the
     *   winning attempt after its promise resolves.
     */
    protected registerAttempt<R>(factory: (winOnPase: () => boolean) => R | PromiseLike<R>, extractWinner: (result: R) => W | undefined): void;
    protected onComplete(): Promise<W>;
}
//# sourceMappingURL=ParallelPaseDiscovery.d.ts.map