import type { RemoteDebugger } from '../remote-debugger';
import type { AppDict, Page, AppIdKey, PageIdKey } from '../types';
/**
 * Sends a connection key request to the Web Inspector.
 * This method only waits to ensure the socket connection works, as the response
 * from Web Inspector can take a long time.
 */
export declare function setConnectionKey(this: RemoteDebugger): Promise<void>;
/**
 * Establishes a connection to the remote debugger and initializes the RPC client.
 * Sets up event listeners for debugger-level events and waits for applications
 * to be reported if a timeout is specified.
 *
 * @param timeout - Maximum time in milliseconds to wait for applications to be reported.
 *                  Defaults to 0 (no waiting). If provided, the method will wait up to
 *                  this duration for applications to appear in the app dictionary.
 * @returns A promise that resolves to the application dictionary containing all
 *          connected applications.
 */
export declare function connect(this: RemoteDebugger, timeout?: number): Promise<AppDict>;
/**
 * Disconnects from the remote debugger by closing the RPC client connection,
 * emitting a disconnect event, and performing cleanup via teardown.
 */
export declare function disconnect(this: RemoteDebugger): Promise<void>;
/**
 * Selects an application from the available connected applications.
 * Searches for an app matching the provided URL and bundle IDs, then returns
 * all pages from the selected application.
 *
 * @param currentUrl - Optional URL to match when selecting an application.
 *                     If provided, the method will try to find an app containing
 *                     a page with this URL.
 * @param maxTries - Maximum number of retry attempts when searching for an app.
 *                   Defaults to SELECT_APP_RETRIES (20).
 * @param ignoreAboutBlankUrl - If true, pages with 'about:blank' URL will be
 *                              excluded from the results. Defaults to false.
 * @returns A promise that resolves to an array of Page objects from the selected
 *          application. Returns an empty array if no applications are connected.
 */
export declare function selectApp(this: RemoteDebugger, currentUrl?: string | null, maxTries?: number, ignoreAboutBlankUrl?: boolean): Promise<Page[]>;
/**
 * Selects a specific page within an application and forwards socket setup.
 * Optionally waits for the page to be ready based on the page load strategy.
 *
 * @param appIdKey - The application identifier key. Will be prefixed with 'PID:'
 *                    if not already present.
 * @param pageIdKey - The page identifier key to select.
 * @param skipReadyCheck - If true, skips the page readiness check. Defaults to false.
 *                         When false, the method will wait for the page to be ready
 *                         according to the configured page load strategy.
 */
export declare function selectPage(this: RemoteDebugger, appIdKey: AppIdKey, pageIdKey: PageIdKey, skipReadyCheck?: boolean): Promise<void>;
/**
 * Finds app keys based on assigned bundle IDs from the app dictionary.
 * When bundleIds includes a wildcard ('*'), returns all app keys in the app dictionary.
 * Also handles proxy applications that may act on behalf of other bundle IDs.
 *
 * @param bundleIds - Array of bundle identifiers to match against. If the array
 *                    contains a wildcard ('*'), all apps will be returned.
 * @returns Array of application identifier keys that match the provided bundle IDs.
 */
export declare function getPossibleDebuggerAppKeys(this: RemoteDebugger, bundleIds: string[]): string[];
//# sourceMappingURL=connect.d.ts.map