/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { EventEmitter } from 'events';
import type { BrowserWindow } from 'electron';
import type { Browser, BrowserContext, JSHandle, Page } from '../../types/types';
import type * as api from '../../types/types';
import type { Playwright } from '../client/playwright';
import type { Worker } from '../client/worker';
import type childProcess from 'child_process';
export declare const Events: {
    ElectronApplication: {
        Close: string;
        Console: string;
        Window: string;
    };
};
type ElectronLaunchOptions = NonNullable<Parameters<api.Electron['launch']>[0]>;
export declare class Electron implements api.Electron {
    _playwright: Playwright;
    constructor(playwright: Playwright);
    launch(options?: ElectronLaunchOptions): Promise<ElectronApplication>;
}
export declare class ElectronApplication extends EventEmitter implements api.ElectronApplication {
    private _worker;
    private _browser;
    private _process;
    private _context;
    private _windows;
    private _appHandlePromise;
    private _closedPromise;
    constructor(worker: Worker, browser: Browser, process: childProcess.ChildProcess);
    _onClose(): void;
    process(): childProcess.ChildProcess;
    _onPage(page: Page): void;
    windows(): Page[];
    firstWindow(options?: {
        timeout?: number;
    }): Promise<Page>;
    context(): BrowserContext;
    [Symbol.asyncDispose](): Promise<void>;
    close(): Promise<void>;
    waitForEvent(event: string, optionsOrPredicate?: Function | {
        timeout?: number;
        predicate?: Function;
    }): Promise<any>;
    _initialize(): Promise<void>;
    browserWindow(page: Page): Promise<JSHandle<BrowserWindow>>;
    evaluate<R, Arg>(pageFunction: any, arg: Arg): Promise<R>;
    evaluateHandle<Arg>(pageFunction: any, arg: Arg): Promise<any>;
}
export {};
//# sourceMappingURL=electron.d.ts.map