import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { UnguessableToken as mojoBase_mojom_UnguessableToken } from '//resources/mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js';
import { BitmapMappedFromTrustedProcess as skia_mojom_BitmapMappedFromTrustedProcess } from '//resources/mojo/skia/public/mojom/bitmap.mojom-webui.js';
import { PointF as gfx_mojom_PointF, RectF as gfx_mojom_RectF } from '//resources/mojo/ui/gfx/geometry/mojom/geometry.mojom-webui.js';
export declare const DismissOverlayReasonSpec: {
    $: mojo.internal.MojomType;
};
export declare enum DismissOverlayReason {
    MIN_VALUE = 0,
    MAX_VALUE = 1,
    kCloseButton = 0,
    kBackgroundClick = 1
}
export type SelectionOverlayPageHandlerFactoryPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPageHandlerFactoryPendingReceiver>;
export declare class SelectionOverlayPageHandlerFactoryPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<SelectionOverlayPageHandlerFactory> {
    handle: mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPageHandlerFactoryPendingReceiver>;
    constructor(handle: MojoHandle | SelectionOverlayPageHandlerFactoryPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface SelectionOverlayPageHandlerFactoryInterface {
    createPageHandler(handler: SelectionOverlayPageHandlerPendingReceiver, page: SelectionOverlayPageRemote): void;
}
export declare class SelectionOverlayPageHandlerFactoryRemote implements SelectionOverlayPageHandlerFactoryInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<SelectionOverlayPageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | SelectionOverlayPageHandlerFactoryPendingReceiverEndpoint);
    createPageHandler(handler: SelectionOverlayPageHandlerPendingReceiver, page: SelectionOverlayPageRemote): void;
}
/**
 * An object which receives request messages for the SelectionOverlayPageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class SelectionOverlayPageHandlerFactoryReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageHandlerFactoryRemote, SelectionOverlayPageHandlerFactoryPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: SelectionOverlayPageHandlerFactoryInterface);
}
export declare class SelectionOverlayPageHandlerFactory {
    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(): SelectionOverlayPageHandlerFactoryRemote;
}
/**
 * An object which receives request messages for the SelectionOverlayPageHandlerFactory
 * 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 SelectionOverlayPageHandlerFactoryCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageHandlerFactoryRemote, SelectionOverlayPageHandlerFactoryPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    createPageHandler: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(handler: SelectionOverlayPageHandlerPendingReceiver, page: SelectionOverlayPageRemote) => 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 SelectionOverlayPageHandlerPendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPageHandlerPendingReceiver>;
export declare class SelectionOverlayPageHandlerPendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<SelectionOverlayPageHandler> {
    handle: mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPageHandlerPendingReceiver>;
    constructor(handle: MojoHandle | SelectionOverlayPageHandlerPendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface SelectionOverlayPageHandlerInterface {
    dismissOverlay(dismissReason: DismissOverlayReason): void;
    adjustRegion(target: SelectedRegion, isUsingKeyboard: boolean): void;
    deleteRegion(id: mojoBase_mojom_UnguessableToken, isUsingKeyboard: boolean): void;
    closePreselectionBubble(): void;
    addBackgroundBlur(): void;
    setLiveBlur(enabled: boolean): void;
}
export declare class SelectionOverlayPageHandlerRemote implements SelectionOverlayPageHandlerInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<SelectionOverlayPageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | SelectionOverlayPageHandlerPendingReceiverEndpoint);
    dismissOverlay(dismissReason: DismissOverlayReason): void;
    adjustRegion(target: SelectedRegion, isUsingKeyboard: boolean): void;
    deleteRegion(id: mojoBase_mojom_UnguessableToken, isUsingKeyboard: boolean): void;
    closePreselectionBubble(): void;
    addBackgroundBlur(): void;
    setLiveBlur(enabled: boolean): void;
}
/**
 * An object which receives request messages for the SelectionOverlayPageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class SelectionOverlayPageHandlerReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageHandlerRemote, SelectionOverlayPageHandlerPendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: SelectionOverlayPageHandlerInterface);
}
export declare class SelectionOverlayPageHandler {
    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(): SelectionOverlayPageHandlerRemote;
}
/**
 * An object which receives request messages for the SelectionOverlayPageHandler
 * 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 SelectionOverlayPageHandlerCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageHandlerRemote, SelectionOverlayPageHandlerPendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    dismissOverlay: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(dismissReason: DismissOverlayReason) => any>;
    adjustRegion: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(target: SelectedRegion, isUsingKeyboard: boolean) => any>;
    deleteRegion: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(id: mojoBase_mojom_UnguessableToken, isUsingKeyboard: boolean) => any>;
    closePreselectionBubble: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    addBackgroundBlur: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<() => any>;
    setLiveBlur: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(enabled: 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 type SelectionOverlayPagePendingReceiverEndpoint = mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPagePendingReceiver>;
export declare class SelectionOverlayPagePendingReceiver implements mojo.internal.interfaceSupport.PendingReceiver<SelectionOverlayPage> {
    handle: mojo.internal.interfaceSupport.Endpoint<SelectionOverlayPagePendingReceiver>;
    constructor(handle: MojoHandle | SelectionOverlayPagePendingReceiverEndpoint);
    bindInBrowser(scope?: string): void;
}
export interface SelectionOverlayPageInterface {
    screenshotReceived(screenshot: skia_mojom_BitmapMappedFromTrustedProcess): void;
    setPostRegionSelections(regions: SelectedRegion[]): void;
}
export declare class SelectionOverlayPageRemote implements SelectionOverlayPageInterface {
    private proxy;
    $: mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<SelectionOverlayPagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(handle?: MojoHandle | SelectionOverlayPagePendingReceiverEndpoint);
    screenshotReceived(screenshot: skia_mojom_BitmapMappedFromTrustedProcess): void;
    setPostRegionSelections(regions: SelectedRegion[]): void;
}
/**
 * An object which receives request messages for the SelectionOverlayPage
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export declare class SelectionOverlayPageReceiver {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageRemote, SelectionOverlayPagePendingReceiver>;
    onConnectionError: mojo.internal.interfaceSupport.ConnectionErrorEventRouter;
    constructor(impl: SelectionOverlayPageInterface);
}
export declare class SelectionOverlayPage {
    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(): SelectionOverlayPageRemote;
}
/**
 * An object which receives request messages for the SelectionOverlayPage
 * 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 SelectionOverlayPageCallbackRouter {
    private helper_internal_;
    $: mojo.internal.interfaceSupport.InterfaceReceiverHelper<SelectionOverlayPageRemote, SelectionOverlayPagePendingReceiver>;
    router_: mojo.internal.interfaceSupport.CallbackRouter;
    screenshotReceived: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(screenshot: skia_mojom_BitmapMappedFromTrustedProcess) => any>;
    setPostRegionSelections: mojo.internal.interfaceSupport.InterfaceCallbackReceiver<(regions: SelectedRegion[]) => 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 SelectedRegionSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandlerFactory_CreatePageHandler_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_DismissOverlay_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_AdjustRegion_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_DeleteRegion_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_ClosePreselectionBubble_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_AddBackgroundBlur_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPageHandler_SetLiveBlur_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPage_ScreenshotReceived_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const SelectionOverlayPage_SetPostRegionSelections_ParamsSpec: {
    $: mojo.internal.MojomType;
};
export declare const RegionShapeSpec: {
    $: mojo.internal.MojomType;
};
export interface SelectedRegionMojoType {
    id: mojoBase_mojom_UnguessableToken;
    shape: RegionShape;
}
export type SelectedRegion = SelectedRegionMojoType;
export interface SelectionOverlayPageHandlerFactory_CreatePageHandler_ParamsMojoType {
    handler: SelectionOverlayPageHandlerPendingReceiver;
    page: SelectionOverlayPageRemote;
}
export type SelectionOverlayPageHandlerFactory_CreatePageHandler_Params = SelectionOverlayPageHandlerFactory_CreatePageHandler_ParamsMojoType;
export interface SelectionOverlayPageHandler_DismissOverlay_ParamsMojoType {
    dismissReason: DismissOverlayReason;
}
export type SelectionOverlayPageHandler_DismissOverlay_Params = SelectionOverlayPageHandler_DismissOverlay_ParamsMojoType;
export interface SelectionOverlayPageHandler_AdjustRegion_ParamsMojoType {
    target: SelectedRegion;
    isUsingKeyboard: boolean;
}
export type SelectionOverlayPageHandler_AdjustRegion_Params = SelectionOverlayPageHandler_AdjustRegion_ParamsMojoType;
export interface SelectionOverlayPageHandler_DeleteRegion_ParamsMojoType {
    id: mojoBase_mojom_UnguessableToken;
    isUsingKeyboard: boolean;
}
export type SelectionOverlayPageHandler_DeleteRegion_Params = SelectionOverlayPageHandler_DeleteRegion_ParamsMojoType;
export interface SelectionOverlayPageHandler_ClosePreselectionBubble_ParamsMojoType {
}
export type SelectionOverlayPageHandler_ClosePreselectionBubble_Params = SelectionOverlayPageHandler_ClosePreselectionBubble_ParamsMojoType;
export interface SelectionOverlayPageHandler_AddBackgroundBlur_ParamsMojoType {
}
export type SelectionOverlayPageHandler_AddBackgroundBlur_Params = SelectionOverlayPageHandler_AddBackgroundBlur_ParamsMojoType;
export interface SelectionOverlayPageHandler_SetLiveBlur_ParamsMojoType {
    enabled: boolean;
}
export type SelectionOverlayPageHandler_SetLiveBlur_Params = SelectionOverlayPageHandler_SetLiveBlur_ParamsMojoType;
export interface SelectionOverlayPage_ScreenshotReceived_ParamsMojoType {
    screenshot: skia_mojom_BitmapMappedFromTrustedProcess;
}
export type SelectionOverlayPage_ScreenshotReceived_Params = SelectionOverlayPage_ScreenshotReceived_ParamsMojoType;
export interface SelectionOverlayPage_SetPostRegionSelections_ParamsMojoType {
    regions: SelectedRegion[];
}
export type SelectionOverlayPage_SetPostRegionSelections_Params = SelectionOverlayPage_SetPostRegionSelections_ParamsMojoType;
export interface RegionShape {
    rect?: gfx_mojom_RectF;
    polyline?: gfx_mojom_PointF[];
}
export declare enum RegionShapeFieldTags {
    RECT = 0,
    POLYLINE = 1
}
export declare function whichRegionShape(u: RegionShape): RegionShapeFieldTags;
