import type { CaptureRegionErrorReason as CaptureRegionErrorReasonMojo, CaptureRegionObserver, CaptureRegionResult as CaptureRegionResultMojo, PinCandidate as PinCandidateMojo, PinCandidatesObserver, WebClientHandlerInterface } from '../../glic.mojom-webui.js';
import { ClientCapabilities } from '../../glic_api/glic_api.js';
import type { CaptureRegionParams, ClientErrorDialogType, ConversationInfo, CounterAbuseVerdict, CreateSkillRequest, ExperimentalTriggeringUpdate, GetPinCandidatesOptions, MicrophoneStatus, OnResponseStoppedDetails, OpenSettingsOptions, PinTabsOptions, Screenshot, Skill, SkillsWebClientEvent, TabContextOptions, UnpinTabsOptions, UpdateSkillRequest, WebClientMode, ZeroStateSuggestions, ZeroStateSuggestionsOptions, ZeroStateSuggestionsV2 } from '../../glic_api/glic_api.js';
import type { ActorClient, ActorHost, AnnotationHost, GlicException, ImageBytesResultPrivate, RgbaImage, TabContextResultPrivate, WebClientHost, WebClientInitialStatePrivate, WebClientPinCandidatesObserver, WebClientRegionCapture, WebClientTabDataObserver, WebClientTabFaviconObserver } from '../request_types.js';
import { SubscriberObservationType } from '../request_types.js';
import { ResponseExtras } from '../transport/messaging.js';
import type { PendingReceiver, PendingRemote, PostMessageHandler, PostMessageRemote } from '../transport/post_message_transport.js';
import type { ApiHostEmbedder, GlicApiHost } from './glic_api_host.js';
/**
 * Handles all requests to the host.
 *
 * Each function is a message handler, automatically called when the host
 * receives a message with the corresponding request name.
 *
 * Any new state or function that's not a handler should be added to
 * `GlicApiHost`.
 */
export declare class HostMessageHandler implements PostMessageHandler<WebClientHost> {
    private handler;
    private embedder;
    private host;
    private receiver;
    constructor(handler: WebClientHandlerInterface, embedder: ApiHostEmbedder, host: GlicApiHost);
    destroy(): void;
    webClientCreated(request: {
        clientCapabilities: ClientCapabilities[];
    }, extras: ResponseExtras): Promise<{
        initialState: WebClientInitialStatePrivate;
        actorRemote?: PendingRemote<ActorHost>;
        actorReceiver?: PendingReceiver<ActorClient>;
    }>;
    createAnnotationHandler(request: {
        annotationReceiver: PendingReceiver<AnnotationHost>;
    }, _extras: ResponseExtras): void;
    webClientInitialized(request: {
        success: boolean;
        exception?: GlicException;
    }): void;
    onExperimentalTriggeringUpdate(payload: {
        observationId: number;
        update?: ExperimentalTriggeringUpdate;
        observation: SubscriberObservationType;
    }): void;
    createTab(request: {
        url: string;
        options: {
            openInBackground?: boolean;
            windowId?: string;
        };
    }): Promise<{
        tabData: {
            tabId: string;
            windowId: string;
            url: string;
            title: string | undefined;
        };
    } | {
        tabData?: undefined;
    }>;
    activateTabWithUrl(request: {
        exactUrl: string;
        options: {
            pattern?: string;
            fallbackWindowId?: string;
        };
    }): Promise<{
        tabData: {
            tabId: string;
            windowId: string;
            url: string;
            title: string | undefined;
        };
    } | {
        tabData?: undefined;
    }>;
    openGlicSettingsPage(request: {
        options?: OpenSettingsOptions;
    }): void;
    openPasswordManagerSettingsPage(): void;
    reportClientTransientError(request: {
        abslStatus: number;
    }): void;
    processCounterAbuseVerdict(request: {
        tabId: string;
        verdict: CounterAbuseVerdict;
    }): void;
    closePanel(): void;
    closePanelAndShutdown(): void;
    attachPanel(): void;
    detachPanel(): void;
    showProfilePicker(): void;
    getModelQualityClientId(): Promise<{
        modelQualityClientId: string;
    }>;
    switchConversation(request: {
        info?: ConversationInfo;
    }): Promise<{}>;
    registerConversation(request: {
        info: ConversationInfo;
    }): Promise<{}>;
    getContextFromFocusedTab(request: {
        options: TabContextOptions;
    }, extras: ResponseExtras): Promise<{
        tabContextResult: TabContextResultPrivate;
    }>;
    getContextFromTab(request: {
        tabId: string;
        options: TabContextOptions;
    }, extras: ResponseExtras): Promise<{
        tabContextResult: TabContextResultPrivate;
    }>;
    getImageBytesFromTab(request: {
        tabId: string;
        documentId: string;
        domNodeId: number;
    }, extras: ResponseExtras): Promise<{
        result: ImageBytesResultPrivate | null;
    }>;
    setMaximumNumberOfPinnedTabs(request: {
        requestedMax: number;
    }): Promise<{
        effectiveMax: number;
    }>;
    createSkill(request: {
        request: CreateSkillRequest;
    }): Promise<{
        modalOpened: boolean;
    }>;
    updateSkill(request: {
        request: UpdateSkillRequest;
    }): Promise<{
        modalOpened: boolean;
    }>;
    showManageSkillsUi(_request: void): void;
    showBrowseSkillsUi(_request: void): void;
    getSkill(request: {
        id: string;
    }): Promise<{
        skill?: Skill;
    }>;
    recordSkillsWebClientEvent(request: {
        event: SkillsWebClientEvent;
    }): void;
    activateTab(request: {
        tabId: string;
    }): void;
    resizeWindow(request: {
        size: {
            width: number;
            height: number;
        };
        options?: {
            durationMs?: number;
        };
    }): Promise<void>;
    enableDragResize(request: {
        enabled: boolean;
    }): void;
    subscribeToCaptureRegion(request: {
        remote: PendingRemote<WebClientRegionCapture>;
        params?: CaptureRegionParams;
    }): void;
    subscribeToZoomLevel(): void;
    unsubscribeFromZoomLevel(): void;
    deleteCapturedRegion(request: {
        tabId: string;
        regionId: string;
    }): void;
    captureScreenshot(_request: void, extras: ResponseExtras): Promise<{
        screenshot: Screenshot;
    }>;
    setMinimumWidgetSize(request: {
        size: {
            width: number;
            height: number;
        };
    }): void;
    setMicrophonePermissionState(request: {
        enabled: boolean;
    }): Promise<void>;
    setLocationPermissionState(request: {
        enabled: boolean;
    }): Promise<void>;
    setTabContextPermissionState(request: {
        enabled: boolean;
    }): Promise<void>;
    setClosedCaptioningSetting(request: {
        enabled: boolean;
    }): Promise<void>;
    setActuationOnWebSetting(request: {
        enabled: boolean;
    }): Promise<void>;
    getUserProfileInfo(_request: void, extras: ResponseExtras): Promise<{
        profileInfo?: undefined;
    } | {
        profileInfo: Omit<import("../../glic.mojom-webui.js").UserProfileInfoMojoType, "avatarIcon"> & {
            avatarIcon: RgbaImage | undefined;
        };
    }>;
    refreshSignInCookies(): Promise<{
        success: boolean;
    }>;
    setContextAccessIndicator(request: {
        show: boolean;
    }): void;
    setAudioDucking(request: {
        enabled: boolean;
    }): void;
    onOptinImpression(): void;
    onUserInputSubmitted(request: {
        mode: number;
    }): void;
    onContextUploadStarted(): void;
    onContextUploadCompleted(): void;
    onReaction(request: {
        reactionType: number;
    }): void;
    onActionSubmitted(request: {
        isRetry?: boolean;
    }): void;
    onResponseStarted(): void;
    onResponseStopped(request: {
        details?: OnResponseStoppedDetails;
    }): void;
    onSessionTerminated(): void;
    onTurnCompleted(request: {
        model: number;
        duration: number;
    }): void;
    recordHistogram(request: {
        name: string;
        sparseValue: number;
    }): void;
    onResponseRated(request: {
        positive: boolean;
    }): void;
    onClosedCaptionsShown(): void;
    setSyntheticExperimentState(request: {
        trialName: string;
        groupName: string;
    }): void;
    openOsPermissionSettingsMenu(request: {
        permission: string;
    }): void | Promise<void>;
    getOsMicrophonePermissionStatus(): Promise<{
        enabled: boolean;
    }>;
    pinTabs(request: {
        tabIds: string[];
        options?: PinTabsOptions;
    }): Promise<{
        pinnedAll: boolean;
    }>;
    unpinTabs(request: {
        tabIds: string[];
        options?: UnpinTabsOptions;
    }): Promise<{
        unpinnedAll: boolean;
    }>;
    unpinAllTabs(request: {
        options?: UnpinTabsOptions;
    }): void;
    subscribeToPinCandidates(request: {
        options: GetPinCandidatesOptions;
        pinCandidatesPipe: PendingRemote<WebClientPinCandidatesObserver>;
    }): void;
    getZeroStateSuggestionsForFocusedTab(request: {
        isFirstRun?: boolean;
    }): Promise<{
        suggestions?: ZeroStateSuggestions;
    }>;
    getZeroStateSuggestionsAndSubscribe(request: {
        hasActiveSubscription: boolean;
        options: ZeroStateSuggestionsOptions;
    }): Promise<{
        suggestions?: ZeroStateSuggestionsV2;
    }>;
    maybeRefreshUserStatus(): void;
    subscribeToPageMetadata(request: {
        tabId: string;
        names: string[];
    }): Promise<{
        success: boolean;
    }>;
    onModeChange(request: {
        newMode: WebClientMode;
    }): void;
    onMicrophoneStatusChange(request: {
        status: MicrophoneStatus;
    }): void;
    setOnboardingCompleted(): void;
    subscribeToTabData(request: {
        tabId: string;
        remote: PendingRemote<WebClientTabDataObserver>;
    }): void;
    subscribeToTabFavicon(request: {
        tabId: string;
        remote: PendingRemote<WebClientTabFaviconObserver>;
    }): void;
    setErrorDialogState(request: {
        shownDialogType?: ClientErrorDialogType;
    }): void;
}
export declare class CaptureRegionObserverImpl implements CaptureRegionObserver {
    readonly pmRemote: PostMessageRemote<WebClientRegionCapture>;
    private handler;
    private params?;
    private mojoReceiver?;
    constructor(pmRemote: PostMessageRemote<WebClientRegionCapture>, handler: WebClientHandlerInterface, params?: CaptureRegionParams | undefined);
    destroy(): void;
    onUpdate(result: CaptureRegionResultMojo | null, reason: CaptureRegionErrorReasonMojo | null): void;
}
export declare class PinCandidatesObserverImpl implements PinCandidatesObserver {
    private pmRemote;
    private handler;
    private options;
    private mojoReceiver?;
    constructor(pmRemote: PostMessageRemote<WebClientPinCandidatesObserver>, handler: WebClientHandlerInterface, options: GetPinCandidatesOptions);
    disconnectFromSource(): void;
    destroy(): void;
    connectToSource(): void;
    onPinCandidatesChanged(candidates: PinCandidateMojo[]): void;
}
