import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { AiOverlayToolsPendingReceiver as aiOverlayDialog_mojom_AiOverlayToolsPendingReceiver } from './tools.mojom-webui.js';
import { Url as url_mojom_Url } from '//resources/mojo/url/mojom/url.mojom-webui.js';
export type PageHandlerFactoryPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PageHandlerFactoryPendingReceiver>;
export declare class PageHandlerFactoryPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<PageHandlerFactory> {
    handle: mojo.internal.interfaceSupport.Endpoint<PageHandlerFactoryPendingReceiver>;
    constructor(handle: MojoHandle | PageHandlerFactoryPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageHandlerFactoryInterface {
    createPageHandler(handler: PageHandlerPendingReceiver, page: PageRemote, tools: aiOverlayDialog_mojom_AiOverlayToolsPendingReceiver): void;
}
export declare class PageHandlerFactoryRemote implements PageHandlerFactoryInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PageHandlerFactoryPendingReceiverEndpoint);
    createPageHandler(handler: PageHandlerPendingReceiver, page: PageRemote, tools: aiOverlayDialog_mojom_AiOverlayToolsPendingReceiver): void;
}
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageHandlerFactoryReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerFactoryRemote, PageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageHandlerFactoryInterface);
}
export declare class PageHandlerFactory {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageHandlerFactoryRemote;
}
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageHandlerFactoryCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerFactoryRemote, PageHandlerFactoryPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    createPageHandler: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(handler: PageHandlerPendingReceiver, page: PageRemote, tools: aiOverlayDialog_mojom_AiOverlayToolsPendingReceiver) => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export type PageHandlerPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PageHandlerPendingReceiver>;
export declare class PageHandlerPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<PageHandler> {
    handle: mojo.internal.interfaceSupport.Endpoint<PageHandlerPendingReceiver>;
    constructor(handle: MojoHandle | PageHandlerPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageHandlerInterface {
    getMockAudioData(): Promise<{
        jsonData: (string | null);
    }>;
    updateAudioEnergy(energy: number): void;
}
export declare class PageHandlerRemote implements PageHandlerInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PageHandlerPendingReceiverEndpoint);
    getMockAudioData(): Promise<{
        jsonData: (string | null);
    }>;
    updateAudioEnergy(energy: number): void;
}
/**
 * An object which receives request messages for the PageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageHandlerReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerRemote, PageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageHandlerInterface);
}
export declare class PageHandler {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageHandlerRemote;
}
/**
 * An object which receives request messages for the PageHandler
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageHandlerCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageHandlerRemote, PageHandlerPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    getMockAudioData: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    updateAudioEnergy: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(energy: number) => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export type PagePendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<PagePendingReceiver>;
export declare class PagePendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<Page> {
    handle: mojo.internal.interfaceSupport.Endpoint<PagePendingReceiver>;
    constructor(handle: MojoHandle | PagePendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface PageInterface {
    didChangePage(url: string, title: (string | null), content: (string | null)): void;
    updateCurrentPageContext(pageTitle: string, rootNode: (PageContentNode | null)): void;
    setInputCaptionsVisible(visible: boolean): void;
    setOutputCaptionsVisible(visible: boolean): void;
    setUsePersona(usePersona: boolean): void;
}
export declare class PageRemote implements PageInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<PagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | PagePendingReceiverEndpoint);
    didChangePage(url: string, title: (string | null), content: (string | null)): void;
    updateCurrentPageContext(pageTitle: string, rootNode: (PageContentNode | null)): void;
    setInputCaptionsVisible(visible: boolean): void;
    setOutputCaptionsVisible(visible: boolean): void;
    setUsePersona(usePersona: boolean): void;
}
/**
 * An object which receives request messages for the Page
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class PageReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageRemote, PagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: PageInterface);
}
export declare class Page {
    static get $interfaceName(): string;
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote(): PageRemote;
}
/**
 * An object which receives request messages for the Page
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export declare class PageCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<PageRemote, PagePendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    didChangePage: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(url: string, title: (string | null), content: (string | null)) => any>;
    updateCurrentPageContext: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(pageTitle: string, rootNode: (PageContentNode | null)) => any>;
    setInputCaptionsVisible: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(visible: boolean) => any>;
    setOutputCaptionsVisible: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(visible: boolean) => any>;
    setUsePersona: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(usePersona: boolean) => any>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor();
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id: number): boolean;
}
export declare const PageContentNodeSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandlerFactory_CreatePageHandler_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_GetMockAudioData_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_GetMockAudioData_ResponseParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const PageHandler_UpdateAudioEnergy_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_DidChangePage_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_UpdateCurrentPageContext_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_SetInputCaptionsVisible_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_SetOutputCaptionsVisible_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const Page_SetUsePersona_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export interface PageContentNodeMojoType {
    domNodeId: number;
    isInteractive: boolean;
    tagName: string;
    text: string;
    url: (url_mojom_Url | null);
    children: PageContentNode[];
}
export type PageContentNode = PageContentNodeMojoType;
export interface PageHandlerFactory_CreatePageHandler_ParamsMojoType {
    handler: PageHandlerPendingReceiver;
    page: PageRemote;
    tools: aiOverlayDialog_mojom_AiOverlayToolsPendingReceiver;
}
export type PageHandlerFactory_CreatePageHandler_Params = PageHandlerFactory_CreatePageHandler_ParamsMojoType;
export interface PageHandler_GetMockAudioData_ParamsMojoType {
}
export type PageHandler_GetMockAudioData_Params = PageHandler_GetMockAudioData_ParamsMojoType;
export interface PageHandler_GetMockAudioData_ResponseParamsMojoType {
    jsonData: (string | null);
}
export type PageHandler_GetMockAudioData_ResponseParams = PageHandler_GetMockAudioData_ResponseParamsMojoType;
export interface PageHandler_UpdateAudioEnergy_ParamsMojoType {
    energy: number;
}
export type PageHandler_UpdateAudioEnergy_Params = PageHandler_UpdateAudioEnergy_ParamsMojoType;
export interface Page_DidChangePage_ParamsMojoType {
    url: string;
    title: (string | null);
    content: (string | null);
}
export type Page_DidChangePage_Params = Page_DidChangePage_ParamsMojoType;
export interface Page_UpdateCurrentPageContext_ParamsMojoType {
    pageTitle: string;
    rootNode: (PageContentNode | null);
}
export type Page_UpdateCurrentPageContext_Params = Page_UpdateCurrentPageContext_ParamsMojoType;
export interface Page_SetInputCaptionsVisible_ParamsMojoType {
    visible: boolean;
}
export type Page_SetInputCaptionsVisible_Params = Page_SetInputCaptionsVisible_ParamsMojoType;
export interface Page_SetOutputCaptionsVisible_ParamsMojoType {
    visible: boolean;
}
export type Page_SetOutputCaptionsVisible_Params = Page_SetOutputCaptionsVisible_ParamsMojoType;
export interface Page_SetUsePersona_ParamsMojoType {
    usePersona: boolean;
}
export type Page_SetUsePersona_Params = Page_SetUsePersona_ParamsMojoType;
