import { Page, Response } from '@playwright/test';
import { EventSpy } from './page/event-spy';
import { E2ELocator, LocatorOptions } from './page/utils';
export type BalPageOptions = {
    /**
     * Referer header value. If provided it will take preference over the referer header value set by
     * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
     */
    referer?: string;
    /**
     * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
     * `navigationTimeout` option in the config, or by using the
     * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
     * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
     * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
     * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
     */
    timeout?: number;
    /**
     * When to consider operation succeeded, defaults to `load`. Events can be either:
     * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
     * - `'load'` - consider operation to be finished when the `load` event is fired.
     * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
     *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
     * - `'commit'` - consider operation to be finished when network response is received and the document started
     *   loading.
     */
    waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
};
export interface BalPage extends Page {
    locator(selector: string, options?: LocatorOptions): E2ELocator;
    goto(url: string, options?: BalPageOptions): Promise<null | Response>;
    mount(html: string): Promise<void>;
    setupVisualTest(url: string, type?: 'Component' | 'CSS'): Promise<void>;
    waitForChanges(timeoutMs?: number): Promise<void>;
    spyOnEvent(eventName: string): Promise<EventSpy>;
    _e2eEventsIds: number;
    _e2eEvents: Map<number, any>;
}
