/**
 * 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 type { Annotation } from './annotations';
import type { DashboardChannel, DashboardChannelEvents, MouseButton, SessionStatus, Tab } from './dashboardChannel';
import type { ClientInfo } from '../../playwright-core/src/tools/cli-client/registry';
import type { BrowserDescriptor } from '../../playwright-core/src/serverRegistry';
export type { SessionStatus } from './dashboardChannel';
export type Mode = 'readonly' | 'interactive' | 'annotate';
export type RecordingState = {
    phase: 'recording';
} | {
    phase: 'stopped';
    blob: Blob;
    blobUrl: string;
};
export type AnnotateFrame = {
    data: string;
    viewportWidth: number;
    viewportHeight: number;
    ariaSnapshot: string;
};
export type DashboardState = {
    sessions: SessionStatus[];
    clientInfo: ClientInfo | undefined;
    loadingSessions: boolean;
    tabs: Tab[] | null;
    liveFrame: DashboardChannelEvents['frame'] | undefined;
    annotateFrame: AnnotateFrame | undefined;
    pendingAnnotate: {
        initiator: 'cli' | 'user';
    } | null;
    annotateInitiator: 'cli' | 'user' | null;
    mode: Mode;
    recording: RecordingState | null;
};
type Listener = () => void;
export declare class DashboardModel {
    state: DashboardState;
    private _client;
    private _listeners;
    private _requestId;
    constructor(client: DashboardChannel);
    subscribe(listener: Listener): () => void;
    sessionByGuid(guid: string): SessionStatus | undefined;
    closeSession(descriptor: BrowserDescriptor): void;
    setVisible(visible: boolean): void;
    selectTab(tab: Tab): void;
    closeTab(tab: Tab): void;
    newTab(browser: string, context: string): void;
    navigate(url: string): void;
    back(): void;
    forward(): void;
    reload(): void;
    mousemove(x: number, y: number): void;
    mousedown(x: number, y: number, button: MouseButton): void;
    mouseup(x: number, y: number, button: MouseButton): void;
    wheel(deltaX: number, deltaY: number): void;
    keydown(key: string): void;
    keyup(key: string): void;
    toggleInteractive(): void;
    enterInteractive(): void;
    enterAnnotate(initiator: 'cli' | 'user'): void;
    completeAnnotation(): void;
    startRecording(): void;
    stopRecording(): void;
    discardRecording(): void;
    cancelAnnotate(): void;
    submitAnnotation(data: string | undefined, annotations: Annotation[]): Promise<void>;
    private _enterInteractive;
    private _enterAnnotate;
    private _completeAnnotation;
    private _startRecording;
    private _stopRecording;
    private _discardRecording;
    private _cleanupOnModeSwitch;
    private _requestAnnotate;
    private _fetchScreenshot;
    private _emit;
}
//# sourceMappingURL=dashboardModel.d.ts.map