/// <reference types="jquery" />
import { Event, EventHandler, EventListener, EventMapOf, Form, HybridManagerEventMap, InitModelOf, ObjectOrChildModel, Session, Widget } from '../../index';
/**
 * A utility to invoke remote Java actions to simplify the interaction of Scout JS and Scout Classic code
 * to facilitate the creation of hybrid applications.
 */
export declare class HybridManager extends Widget {
    eventMap: HybridManagerEventMap;
    self: HybridManager;
    widgets: Record<string, Widget>;
    constructor();
    static get(session: Session, wait?: false): HybridManager;
    static get(session: Session, wait: true): JQuery.Promise<HybridManager>;
    protected _init(model: InitModelOf<this>): void;
    protected _setWidgets(widgets: Record<string, ObjectOrChildModel<Widget>>): void;
    protected _ensureWidgets(modelsOrWidgets: Record<string, ObjectOrChildModel<Widget>>): Record<string, Widget>;
    protected _triggerWidgetAdd(id: string, widget: Widget): void;
    protected _triggerWidgetRemove(id: string, widget: Widget): void;
    /** @internal */
    onHybridEvent(id: string, eventType: string, data: object): void;
    /** @internal */
    onHybridWidgetEvent(id: string, eventType: string, data: object): void;
    protected _onHybridWidgetEvent(widget: Widget, eventType: string, data: object): void;
    protected _onHybridFormEvent(form: Form, eventType: string, data: object): void;
    protected _createEventId(): string;
    /**
     * @deprecated use {@link callAction} instead.
     */
    triggerHybridAction(eventType: string, data?: object): string;
    /**
     * Calls the hybrid action that matches the given action type.
     *
     * @returns the id of the triggered hybrid action
     * @see IHybridAction.java
     */
    callAction(actionType: string, data?: object): string;
    /**
     * @deprecated use {@link callActionAndWait} instead.
     */
    triggerHybridActionAndWait(eventType: string, data?: object): Promise<object>;
    /**
     * Calls the hybrid action that matches the given action type and returns a promise that will be resolved once the corresponding hybridActionEnd event arrives.
     *
     * @returns a promise that will be resolved once the corresponding hybridActionEnd event arrives.
     * @see IHybridAction
     * @see AbstractHybridAction.fireHybridActionEndEvent
     */
    callActionAndWait(actionType: string, data?: object): JQuery.Promise<object>;
    /**
     * Calls the form hybrid action with the action type `openForm:${modelVariant}` to create, start and show the requested form.
     *
     * @param modelVariant the suffix for the actionType so the correct hybrid action can be resolved
     * @param data a data object that will be passed to the hybrid action
     * @returns a promise that will be resolved once the form has been created
     */
    openForm(modelVariant: string, data?: object): JQuery.Promise<Form>;
    /**
     * Calls the form hybrid action with the action type `createForm:${modelVariant}` to create and start the requested form without showing it.
     *
     * @param modelVariant the suffix for the actionType so the correct hybrid action can be resolved
     * @param data a data object that will be passed to the hybrid action
     * @returns a promise that will be resolved once the form has been created
     */
    createForm(modelVariant: string, data?: object): JQuery.Promise<Form>;
    one<K extends string & keyof EventMapOf<this['self']>>(type: K | `${K}:${string}`, handler: EventHandler<EventMapOf<this>[K] & Event<this>>): void;
    on<K extends string & keyof EventMapOf<this['self']>>(type: K | `${K}:${string}`, handler: EventHandler<EventMapOf<this>[K] & Event<this>>): EventListener;
    off<K extends string & keyof EventMapOf<this['self']>>(type: K | `${K}:${string}`, handler?: EventHandler<EventMapOf<this>[K] & Event<this>>): void;
    when<K extends string & keyof EventMapOf<this['self']>>(type: K | `${K}:${string}`): JQuery.Promise<EventMapOf<this>[K] & Event<this>>;
}
//# sourceMappingURL=HybridManager.d.ts.map