import { CaptureRegionErrorReason, HostCapability } from '../../glic_api/glic_api.js';
import type { ActivateTabOptions, AdditionalContext, CaptureRegionParams, CaptureRegionResult, ChromeVersion, ClientCapabilities, ClientErrorDialogType, ConversationInfo, CounterAbuseVerdict, CreateTabOptions, FileUploadPolicyState, FocusedTabData, FormFactor, GeminiEnterpriseSettings, GetPinCandidatesOptions, GlicBrowserHost, GlicBrowserHostMetrics, GlicHostRegistry, GlicWebClient, ImageBytesResult, MicrophoneStatus, Observable, ObservableValue, OpenPanelInfo, OpenSettingsOptions, PageMetadata, PanelOpeningData, PanelState, PinCandidate, PinTabsOptions, Platform, ResizeWindowOptions, ResumeActorTaskResult, Screenshot, TabContextOptions, TabContextResult, TabData, UnpinTabsOptions, UserProfileInfo, WebClientMode, ZeroStateSuggestions, ZeroStateSuggestionsOptions, ZeroStateSuggestionsV2 } from '../../glic_api/glic_api.js';
import { ObservableValue as ObservableValueImpl, Subject } from '../../observable.js';
import { GlicBrowserHostActor } from '../actor/actor_client.js';
import { GlicBrowserHostAnnotation } from '../annotation/annotation_client.js';
import { GlicBrowserHostExperimentalTriggering } from '../experimental_triggering/experimental_triggering_client.js';
import { GlicBrowserHostSkills } from '../skills/skills_client.js';
import type { PostMessageHandler, PostMessageRemote, PostMessageRouter } from '../transport/post_message_transport.js';
import type { AdditionalContextPrivate, FocusedTabDataPrivate, GlicException, InvokeOptionsPrivate, PinCandidatePrivate, ResumeActorTaskResultPrivate, TabContextResultPrivate, TabDataPrivate, WebClient, WebClientHost, WebClientTabDataObserver, WebClientTabFaviconObserver } from './../request_types.js';
import type { GlicBrowserHostBaseContext } from './glic_client_common.js';
import { ObservableSetByTabId } from './observable_set_by_tab_id.js';
export declare class GlicHostRegistryImpl implements GlicHostRegistry {
    private windowProxy;
    private host;
    constructor(windowProxy: WindowProxy);
    registerWebClient(webClient: GlicWebClient): Promise<void>;
}
declare class WebClientMessageHandler implements PostMessageHandler<WebClient> {
    private webClient;
    private host;
    private cachedPinnedTabs;
    constructor(webClient: GlicWebClient, host: GlicBrowserHostImpl);
    notifyPanelWillOpen(payload: {
        panelOpeningData: PanelOpeningData;
    }): Promise<{
        openPanelInfo?: OpenPanelInfo;
    }>;
    notifyPanelWasClosed(): Promise<void>;
    panelStateChanged(payload: {
        panelState: PanelState;
    }): void;
    zeroStateSuggestionsChanged(payload: {
        suggestions: ZeroStateSuggestionsV2;
        options: ZeroStateSuggestionsOptions;
    }): void;
    canAttachStateChanged(payload: {
        canAttach: boolean;
    }): void;
    notifyGeminiEnterpriseSettingsChanged(payload: {
        settings: GeminiEnterpriseSettings | undefined;
    }): void;
    notifyMicrophonePermissionStateChanged(payload: {
        enabled: boolean;
    }): void;
    stopMicrophone(): Promise<void>;
    notifyLocationPermissionStateChanged(payload: {
        enabled: boolean;
    }): void;
    notifyTabContextPermissionStateChanged(payload: {
        enabled: boolean;
    }): void;
    notifyDefaultTabContextPermissionStateChanged(payload: {
        enabled: boolean;
    }): void;
    notifyOsLocationPermissionStateChanged(payload: {
        enabled: boolean;
    }): void;
    notifyClosedCaptioningSettingChanged(payload: {
        enabled: boolean;
    }): void;
    invoke(payload: {
        options: InvokeOptionsPrivate;
    }): Promise<void>;
    notifyActuationOnWebSettingChanged(payload: {
        enabled: boolean;
    }): void;
    notifyFileUploadStateChanged(payload: {
        state: FileUploadPolicyState;
    }): void;
    notifyFocusedTabChanged(payload: {
        focusedTabDataPrivate: FocusedTabDataPrivate;
    }): void;
    notifyZoomLevelChanged(payload: {
        zoomFactor: number;
    }): void;
    notifyPanelActiveChanged(payload: {
        panelActive: boolean;
    }): void;
    checkResponsive(): Promise<{
        clientSendMessageQueueLength: number;
    }>;
    notifyManualResizeChanged(payload: {
        resizing: boolean;
    }): void;
    browserIsOpenChanged(payload: {
        browserIsOpen: boolean;
    }): void;
    notifyOsHotkeyStateChanged(payload: {
        hotkey: string;
    }): void;
    notifyPinnedTabsChanged(payload: {
        tabData: TabDataPrivate[];
    }): void;
    notifyPinnedTabDataChanged(payload: {
        tabData: TabDataPrivate;
    }): void;
    pageMetadataChanged(payload: {
        tabId: string;
        pageMetadata: PageMetadata | null;
    }): void;
    notifyAdditionalContext(payload: {
        context: AdditionalContextPrivate;
    }): void;
    notifyActOnWebCapabilityChanged(payload: {
        canActOnWeb: boolean;
    }): void;
    onboardingCompletedChanged(payload: {
        completed: boolean;
    }): void;
    notifyActorTaskListRowClicked(payload: {
        taskId: number;
    }): void;
}
export declare class GlicBrowserHostImpl implements GlicBrowserHostBaseContext, GlicBrowserHost {
    webClient: GlicWebClient;
    readonly router: PostMessageRouter;
    protected webClientMessageHandler: WebClientMessageHandler;
    readonly clientRemote: PostMessageRemote<WebClientHost>;
    readonly actorClient: GlicBrowserHostActor;
    readonly annotationClient: GlicBrowserHostAnnotation;
    readonly skillsClient: GlicBrowserHostSkills;
    readonly experimentalTriggeringClient: GlicBrowserHostExperimentalTriggering;
    private chromeVersion?;
    private platform?;
    private formFactor?;
    private panelState;
    canAttachPanelValue: ObservableValueImpl<boolean>;
    private focusedTabStateV2;
    private geminiEnterpriseSettings;
    private zoomLevel;
    private permissionStateMicrophone;
    private permissionStateLocation;
    private permissionStateTabContext;
    defaultTabContextPermission: ObservableValueImpl<boolean>;
    private enableDefaultTabContextSettingFeature;
    private permissionStateOsLocation;
    closedCaptioningState: ObservableValueImpl<boolean>;
    actuationOnWebState: ObservableValueImpl<boolean>;
    fileUploadAllowedState: ObservableValueImpl<FileUploadPolicyState>;
    private osHotkeyState;
    onboardingCompleted: ObservableValueImpl<boolean>;
    panelActiveValue: ObservableValueImpl<boolean>;
    isBrowserOpenValue: ObservableValueImpl<boolean>;
    private metrics;
    private manuallyResizing;
    private cachedUserProfile?;
    private enableCachedGetUserProfileInfo?;
    pinnedTabs: ObservableValueImpl<TabData[]>;
    pinCandidates: PinCandidatesObservable | undefined;
    captureRegionObservable?: CaptureRegionObservable;
    private currentZeroStateSuggestionOptions;
    currentZeroStateObserver: ObservableValueImpl<ZeroStateSuggestionsV2>;
    private hostCapabilities;
    readonly additionalContextSubject: Subject<AdditionalContext>;
    pageMetadataObservers: Map<string, ObservableValueImpl<PageMetadata>>;
    getTabByIdObservableSet: ObservableSetByTabId<TabData, WebClientTabDataObserver>;
    getTabFaviconByIdObservableSet: ObservableSetByTabId<Blob | undefined, WebClientTabFaviconObserver>;
    notifyPanelWillOpenCompleted: PromiseWithResolvers<void>;
    constructor(webClient: GlicWebClient, windowProxy: WindowProxy);
    destroy(): void;
    webClientCreated(clientCapabilities: Set<ClientCapabilities>): Promise<void>;
    webClientInitialized(success: boolean, exception: GlicException | undefined): void;
    getChromeVersion(): Promise<ChromeVersion>;
    experimentalTriggering(): GlicBrowserHostExperimentalTriggering;
    getPlatform(): Platform;
    getFormFactor(): FormFactor;
    createTab(url: string, options: CreateTabOptions): Promise<TabData>;
    activateTabWithUrl(exactUrl: string, options?: ActivateTabOptions): Promise<TabData>;
    openGlicSettingsPage(options?: OpenSettingsOptions): void;
    openPasswordManagerSettingsPage?(): void;
    reportClientTransientError(abslStatus: number): void;
    processCounterAbuseVerdict?(tabId: string, verdict: CounterAbuseVerdict): void;
    closePanel(): Promise<void>;
    closePanelAndShutdown(): void;
    attachPanel?(): void;
    detachPanel?(): void;
    showProfilePicker(): void;
    getModelQualityClientId?(): Promise<string>;
    getGeminiEnterpriseSettings?(): ObservableValueImpl<GeminiEnterpriseSettings | undefined>;
    switchConversation(info?: ConversationInfo): Promise<void>;
    registerConversation(info: ConversationInfo): Promise<void>;
    getContextFromFocusedTab(options: TabContextOptions): Promise<TabContextResult>;
    setMaximumNumberOfPinnedTabs?(requestedMax: number): Promise<number>;
    getContextFromTab?(tabId: string, options: TabContextOptions): Promise<TabContextResult>;
    getImageBytesFromTab?(tabId: string, documentId: string, domNodeId: number): Promise<ImageBytesResult>;
    getTabById?(tabId: string): ObservableValueImpl<TabData>;
    getTabFaviconById?(tabId: string): ObservableValueImpl<Blob | undefined>;
    activateTab?(tabId: string): void;
    onModeChange?(newMode: WebClientMode): void;
    onMicrophoneStatusChange?(status: MicrophoneStatus): void;
    setErrorDialogState?(shownDialogType?: ClientErrorDialogType): void;
    resizeWindow(width: number, height: number, options?: ResizeWindowOptions): Promise<void>;
    enableDragResize?(enabled: boolean): Promise<void>;
    captureScreenshot(): Promise<Screenshot>;
    captureRegion?(params?: CaptureRegionParams): ObservableValue<CaptureRegionResult>;
    deleteCapturedRegion?(tabId: string, regionId: string): void;
    setMinimumWidgetSize(width: number, height: number): Promise<void>;
    getPanelState?(): ObservableValueImpl<PanelState>;
    panelActive(): ObservableValueImpl<boolean>;
    canAttachPanel?(): ObservableValue<boolean>;
    isBrowserOpen(): ObservableValue<boolean>;
    getFocusedTabStateV2(): ObservableValueImpl<FocusedTabData>;
    getZoomLevel(): ObservableValueImpl<number>;
    getMicrophonePermissionState(): ObservableValueImpl<boolean>;
    getLocationPermissionState(): ObservableValueImpl<boolean>;
    getTabContextPermissionState(): ObservableValueImpl<boolean>;
    getDefaultTabContextPermissionState?(): ObservableValueImpl<boolean>;
    getOsLocationPermissionState(): ObservableValueImpl<boolean>;
    getClosedCaptioningSetting?(): ObservableValueImpl<boolean>;
    getActuationOnWebSetting?(): ObservableValueImpl<boolean>;
    getFileUploadAllowedCapability?(): ObservableValueImpl<FileUploadPolicyState>;
    setMicrophonePermissionState(enabled: boolean): Promise<void>;
    setLocationPermissionState(enabled: boolean): Promise<void>;
    setTabContextPermissionState(enabled: boolean): Promise<void>;
    setClosedCaptioningSetting?(enabled: boolean): Promise<void>;
    setContextAccessIndicator(show: boolean): void;
    setActuationOnWebSetting?(enabled: boolean): Promise<void>;
    getUserProfileInfo?(): Promise<UserProfileInfo>;
    private fetchUserProfileDirect;
    private fetchUserProfileCached;
    refreshSignInCookies(): Promise<void>;
    setAudioDucking?(enabled: boolean): void;
    getMetrics(): GlicBrowserHostMetrics;
    setSyntheticExperimentState(trialName: string, groupName: string): void;
    openOsPermissionSettingsMenu?(permission: string): void;
    getOsMicrophonePermissionStatus(): Promise<boolean>;
    isManuallyResizing(): ObservableValueImpl<boolean>;
    getOsHotkeyState(): ObservableValueImpl<{
        hotkey: string;
    }>;
    getPinnedTabs?(): ObservableValueImpl<TabData[]>;
    pinTabs?(tabIds: string[], options?: PinTabsOptions): Promise<boolean>;
    unpinTabs?(tabIds: string[], options?: UnpinTabsOptions): Promise<boolean>;
    unpinAllTabs?(options?: UnpinTabsOptions): void;
    getPinCandidates?(options: GetPinCandidatesOptions): ObservableValue<PinCandidate[]>;
    getZeroStateSuggestionsForFocusedTab?(isFirstRun?: boolean): Promise<ZeroStateSuggestions>;
    private zeroStateActiveSubscriptionStateChanged;
    getZeroStateSuggestions?(options?: ZeroStateSuggestionsOptions): ObservableValueImpl<ZeroStateSuggestionsV2>;
    maybeRefreshUserStatus?(): void;
    getAdditionalContext?(): Observable<AdditionalContext>;
    getHostCapabilities(): Set<HostCapability>;
    getPageMetadata?(tabId: string, names: string[]): ObservableValueImpl<PageMetadata>;
    setOnboardingCompleted?(): void;
    isOnboardingCompleted?(): ObservableValue<boolean>;
}
export declare class CaptureRegionObservable extends ObservableValueImpl<CaptureRegionResult> {
    private remote;
    private router;
    private params?;
    private receiver?;
    constructor(remote: PostMessageRemote<WebClientHost>, router: PostMessageRouter, params?: CaptureRegionParams | undefined);
    private close;
    activeSubscriptionChanged(hasActiveSubscription: boolean): void;
    error(e: Error): void;
    complete(): void;
    processUpdate(result: CaptureRegionResult): void;
    processError(reason: CaptureRegionErrorReason): void;
}
declare class PinCandidatesObservable extends ObservableValueImpl<PinCandidate[]> {
    private remote;
    private router;
    private options;
    private isObsolete;
    private receiver?;
    constructor(remote: PostMessageRemote<WebClientHost>, router: PostMessageRouter, options: GetPinCandidatesOptions);
    activeSubscriptionChanged(hasActiveSubscription: boolean): void;
    processUpdate(candidates: PinCandidatePrivate[]): void;
    setObsolete(): void;
}
export declare function convertTabDataFromPrivate(data: TabDataPrivate): TabData;
export declare function convertTabDataFromPrivate(data: TabDataPrivate | undefined): TabData | undefined;
export declare function convertTabContextResultFromPrivate(data: ResumeActorTaskResultPrivate): ResumeActorTaskResult;
export declare function convertTabContextResultFromPrivate(data: TabContextResultPrivate): TabContextResult;
export {};
