/**
 * 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 fs from 'fs';
import type * as api from '../../..';
import type { Transport } from '@utils/httpServer';
import type { AnnotationData, Tab } from '@dashboard/dashboardChannel';
import type { BrowserDescriptor } from '../../serverRegistry';
import type { SessionProvider } from './sessionProvider';
export declare class DashboardConnection implements Transport {
    sendEvent?: (method: string, params: any) => void;
    close?: () => void;
    private _provider;
    private _attachedPage;
    private _onclose;
    private _onconnected?;
    private _onAnnotationSubmit?;
    private _pushTabsScheduled;
    private _visible;
    private _pendingReveal;
    private _annotateWaitingForAttach;
    _recordingDir: string;
    _streams: Map<string, {
        handle: fs.promises.FileHandle;
        path: string;
    }>;
    constructor(provider: SessionProvider, onclose: () => void, onconnected?: () => void, onAnnotationSubmit?: (base64Png: string | undefined, ariaSnapshot: string, annotations: AnnotationData[]) => void);
    onconnect(): void;
    onclose(): void;
    dispatch(method: string, params: any): Promise<any>;
    selectTab(params: {
        browser: string;
        context: string;
        page: string;
    }): Promise<void>;
    newTab(params: {
        browser: string;
        context: string;
    }): Promise<void>;
    closeTab(params: {
        browser: string;
        context: string;
        page: string;
    }): Promise<void>;
    closeSession(params: {
        browser: string;
    }): Promise<void>;
    setVisible(params: {
        visible: boolean;
    }): Promise<void>;
    revealSession(sessionName: string, workspaceDir?: string): void;
    revealPage(pageId: string): void;
    private _tryRevealPending;
    submitAnnotation(params: {
        data: string | undefined;
        ariaSnapshot: string;
        annotations: AnnotationData[];
    }): Promise<void>;
    reveal(params: {
        path: string;
    }): Promise<void>;
    readStream(params: {
        streamId: string;
    }): Promise<{
        data: string;
        eof: boolean;
    }>;
    visible(): boolean;
    emitSessions(sessions: BrowserDescriptor[]): void;
    emitTabs(tabs: Tab[]): void;
    emitFrame(data: string, viewportWidth: number, viewportHeight: number): void;
    emitAnnotate(): void;
    emitCancelAnnotate(): void;
    artifactsDirFor(context: api.BrowserContext): string;
    _pushTabs(): void;
    private _pushSessions;
    private _aggregateTabs;
    private _switchAttachedTo;
    _handleAttachedPageClose(context: api.BrowserContext): void;
}
//# sourceMappingURL=dashboardController.d.ts.map