import type { ActorTaskInterruptReason, CancelActionsResult, CreateActorTabOptions, FormFillingResponse, GlicBrowserHost, GlicBrowserHostJournal, GmailOtpOptInRequest, Journal, NavigationConfirmationRequest, Observable, ObservableValue, ResumeActorTaskResult, SelectAutofillSuggestionsDialogRequest, SelectCredentialDialogRequest, TabContextOptions, TabContextResult, TabData, TaskOptions, UserConfirmationDialogRequest } from '../../glic_api/glic_api.js';
import { ActorTaskPauseReason, ActorTaskState, ActorTaskStopReason } from '../../glic_api/glic_api.js';
import { ObservableValue as ObservableValueImpl, Subject } from '../../observable.js';
import type { WebClientInitialStatePrivate } from '../request_types.js';
import type { PendingReceiver, PendingRemote, PostMessageHandler, PostMessageRemote, PostMessageRouter } from '../transport/post_message_transport.js';
import type { ActorClient, ActorHost, NavigationConfirmationRequestPrivate, NavigationConfirmationResponsePrivate, SelectAutofillSuggestionsDialogRequestPrivate, SelectAutofillSuggestionsDialogResponsePrivate, SelectCredentialDialogRequestPrivate, SelectCredentialDialogResponsePrivate, UserConfirmationDialogRequestPrivate, UserConfirmationDialogResponsePrivate, GmailOtpOptInRequestPrivate, GmailOtpOptInResponsePrivate } from './actor_types.js';
export declare class GlicBrowserHostActor implements Partial<GlicBrowserHost> {
    private actorWebClientMessageHandler;
    readonly userConfirmationDialogRequestSubject: Subject<UserConfirmationDialogRequest>;
    readonly selectCredentialDialogRequestSubject: Subject<SelectCredentialDialogRequest>;
    readonly navigationConfirmationRequestSubject: Subject<NavigationConfirmationRequest>;
    private actorSender?;
    private actorTaskState;
    readonly selectAutofillSuggestionsDialogRequestSubject: Subject<SelectAutofillSuggestionsDialogRequest>;
    readonly selectGmailOtpOptInRequestSubject: Subject<GmailOtpOptInRequest>;
    private journalHost?;
    actOnWebCapabilityValue: ObservableValueImpl<boolean>;
    readonly actorTaskListRowClickedSubject: Subject<number>;
    constructor();
    initializeActor(initialState: WebClientInitialStatePrivate, router: PostMessageRouter, actorRemote: PendingRemote<ActorHost> | undefined, actorReceiver: PendingReceiver<ActorClient> | undefined): void;
    setActorTaskState(taskId: number, state: ActorTaskState): void;
    selectUserConfirmationDialogRequestHandler(): Observable<UserConfirmationDialogRequest>;
    selectCredentialDialogRequestHandler?(): Observable<SelectCredentialDialogRequest>;
    selectNavigationConfirmationRequestHandler(): Observable<NavigationConfirmationRequest>;
    selectGmailOtpOptInRequestHandler?(): Observable<GmailOtpOptInRequest>;
    autofillSuggestionDialogOnFormPresented(taskId: number, params: {
        formFillingRequestIndex: number;
    }): void;
    autofillSuggestionDialogOnFormPreviewChanged(taskId: number, params: {
        formFillingRequestIndex: number;
        response?: FormFillingResponse;
    }): void;
    autofillSuggestionDialogOnFormConfirmed(taskId: number, params: {
        formFillingRequestIndex: number;
        response: FormFillingResponse;
    }): void;
    getContextForActorFromTab?(tabId: string, options: TabContextOptions): Promise<TabContextResult>;
    createTask?(taskOptions?: TaskOptions): Promise<number>;
    performActions?(actions: ArrayBuffer): Promise<ArrayBuffer>;
    cancelActions?(taskId: number): Promise<CancelActionsResult>;
    stopActorTask?(taskId?: number, stopReason?: ActorTaskStopReason): void;
    pauseActorTask?(taskId: number, pauseReason?: ActorTaskPauseReason, tabId?: string): void;
    resumeActorTask?(taskId: number, tabContextOptions: TabContextOptions): Promise<ResumeActorTaskResult>;
    interruptActorTask?(taskId: number, interruptReason?: ActorTaskInterruptReason): void;
    uninterruptActorTask?(taskId: number): void;
    getActorTaskState(taskId: number): ObservableValueImpl<ActorTaskState>;
    createActorTab?(taskId: number, options: CreateActorTabOptions): Promise<TabData>;
    getActOnWebCapability?(): ObservableValue<boolean>;
    actorTaskListRowClicked?(): Observable<number>;
    getJournalHost?(): GlicBrowserHostJournal;
}
export declare class ActorWebClientMessageHandler implements PostMessageHandler<ActorClient> {
    private actorHost;
    constructor(actorHost: GlicBrowserHostActor);
    notifyActorTaskStateChanged(payload: {
        taskId: number;
        state: ActorTaskState;
    }): void;
    requestToShowDialog(payload: {
        request: SelectCredentialDialogRequestPrivate;
    }): Promise<{
        response: SelectCredentialDialogResponsePrivate;
    }>;
    requestToShowConfirmationDialog(payload: {
        request: UserConfirmationDialogRequestPrivate;
    }): Promise<{
        response: UserConfirmationDialogResponsePrivate;
    }>;
    requestToConfirmNavigation(payload: {
        request: NavigationConfirmationRequestPrivate;
    }): Promise<{
        response: NavigationConfirmationResponsePrivate;
    }>;
    requestToShowAutofillSuggestionsDialog(payload: {
        request: SelectAutofillSuggestionsDialogRequestPrivate;
    }): Promise<{
        response: SelectAutofillSuggestionsDialogResponsePrivate;
    }>;
    requestToShowGmailOtpOptInDialog(payload: {
        request: GmailOtpOptInRequestPrivate;
    }): Promise<{
        response: GmailOtpOptInResponsePrivate;
    }>;
}
export declare class GlicBrowserHostJournalImpl implements GlicBrowserHostJournal {
    private sender;
    constructor(sender: PostMessageRemote<ActorHost>);
    beginAsyncEvent(asyncEventId: number, taskId: number, event: string, details: string): void;
    clear(): void;
    endAsyncEvent(asyncEventId: number, details: string): void;
    instantEvent(taskId: number, event: string, details: string): void;
    snapshot(clear: boolean): Promise<Journal>;
    start(maxBytes: number, captureScreenshots: boolean): void;
    stop(): void;
    recordFeedback(positive: boolean, reason: string): void;
}
