import { Event } from "../../../../base/common/event.js";
import { CDPRequest, CDPResponse, CDPEvent } from "../../../../platform/browserView/common/cdp/types.js";
import { BrowserEditorInput } from "./browserEditorInput.js";
import { IBrowserEditorViewState } from "./browserView.js";
export declare const IBrowserViewWorkbenchService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IBrowserViewWorkbenchService>;
/**
* Workbench-level service for browser views that provides model-based access to browser views.
* This service manages browser view models that proxy to the main process browser view service.
*/
export interface IBrowserViewWorkbenchService {
    readonly _serviceBrand: undefined;
    /**
    * Fires when the set of known browser views changes, or a model is created for an existing input.
    */
    readonly onDidChangeBrowserViews: Event<void>;
    /**
    * Whether sharing browser pages with the agent is currently available
    * (chat enabled, agent mode enabled, browser tools setting enabled, etc.).
    */
    readonly isSharingAvailable: boolean;
    /**
    * Fires when {@link isSharingAvailable} changes.
    */
    readonly onDidChangeSharingAvailable: Event<boolean>;
    /**
    * Get all known browser views.
    */
    getKnownBrowserViews(): Map<string, BrowserEditorInput>;
    /**
    * Get an existing browser view for the given ID, or create a new one if it doesn't exist.
    * The underlying browser view is not created until the editor is opened or the model is resolved.
    */
    getOrCreateLazy(id: string, initialState?: IBrowserEditorViewState): BrowserEditorInput;
    /**
    * Clear all storage data for the global browser session
    */
    clearGlobalStorage(): Promise<void>;
    /**
    * Clear all storage data for the current workspace browser session
    */
    clearWorkspaceStorage(): Promise<void>;
}
export declare const IBrowserViewCDPService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IBrowserViewCDPService>;
/**
* Workbench-level service for managing CDP (Chrome DevTools Protocol) sessions
* against browser views. Handles group lifecycle and window ID resolution.
*/
export interface IBrowserViewCDPService {
    readonly _serviceBrand: undefined;
    /**
    * Create a new CDP group for a browser view.
    * The window ID is resolved from the editor group containing the browser.
    * @param browserId The browser view identifier.
    * @returns The ID of the newly created group.
    */
    createSessionGroup(browserId: string): Promise<string>;
    /** Destroy a CDP group. */
    destroySessionGroup(groupId: string): Promise<void>;
    /** Send a CDP message to a group. */
    sendCDPMessage(groupId: string, message: CDPRequest): Promise<void>;
    /** Fires when a CDP message is received. */
    onCDPMessage(groupId: string): Event<CDPResponse | CDPEvent>;
    /** Fires when a CDP group is destroyed. */
    onDidDestroy(groupId: string): Event<void>;
}
