import PublicEventManager from "../../common/events/PublicEventManager";
import { WINDOWSTATE } from "../constants";
import { FinsembleView } from "./FinsembleView";
import { StandardCallback, StandardErrorCallback, StandardPromise } from "../../types";
import { WindowEventName, WrapState, WindowIdentifier } from "../../services/window/types";
import { Bounds } from "../../common/FinsembleWindowData";
import { WindowDescriptor } from "./../../services/window/types";
import { WindowOptions } from "../../FEA";
/**
 *
 *@introduction
  <h2>Finsemble Window</h2>
  ----------
 */
export declare class FinsembleWindow extends PublicEventManager {
    Group: any;
    componentState: any;
    wrapState: WrapState;
    name: string;
    windowOptions: any;
    bounds: object;
    WINDOWSTATE: any;
    parentWindow: any;
    windowKey: string;
    componentKey: string;
    TITLE_CHANGED_CHANNEL: string;
    TITLE_CHANGED_SUBSCRIPTION: any;
    windowState: WINDOWSTATE;
    identifier: WindowIdentifier | undefined;
    windowName: string | undefined;
    type: string | null;
    windowType: string | null | undefined;
    setWindowType: string | undefined;
    types: any;
    removeListeners?: Function;
    parentSubscribeID: any;
    guid: string;
    uuid?: string;
    outsideOfFinsemble?: boolean;
    private settingParent;
    descriptor?: WindowDescriptor;
    /**
     * @private
     * @param params
     */
    constructor(params: any);
    static WINDOWSTATE: any;
    /**
     * @private
     * @param event
     */
    standardizeEventName(event: any): any;
    addEventListener(eventName: WindowEventName, handler: Function): import("../../common/events/PublicEventManager").Unsubscriber;
    /**
     *
     * @param eventName
     * @param handler
     */
    removeEventListener(eventName: WindowEventName, handler: Function, logWarning?: boolean): void;
    /**
     * @private
     * @param channelTopic
     */
    windowServiceChannelName(channelTopic: any): string;
    /**
     * @private
     * @param channelTopic
     */
    eventChannelName(channelTopic: any): string;
    /**
     * @private
     * @param params
     */
    doConstruction(params: any): any;
    /**
     * @private
     * @param name
     * @param type
     */
    static registerType(name: any, type: any): void;
    /**
     * @private
     * This is used to bind all functions only in FinsembleWindow and not in the child wrappers to the wrappers. Without this binding, the value of "this" in the functions is wrong.
     * @param {} obj
     */
    static bindFunctions(obj: any): void;
    /**
     * Async wrap. Given a name/windowName, it will query the launcher for information required to wrap the window. Then it will return an object that can be operated on. Also this creates a cache of all wrapped windows for performance. Our clients wrap the same window often and this was causing excessive messaging to the store and degrading performance.
     * @param {*} params Need only name in most cases. For service and other cases where the window is not part of what the launcher considers active windows, name and uuid are required
     * @param {boolean} params.waitForReady If true, will async await for Finsemble to return ready before continuing to build the instance to return
     * @param {*} cb
     */
    static wrap: typeof FinsembleWindow.getInstance;
    /**
     * @private
     */
    private static createWrapFromUUIDAndName;
    /**
     * Creating wraps is expensive, involving a router query to the window service. The static member
     * `cache` is used to store these handles so that they can be used frequently.
     */
    private static cache;
    /**
     *
     * @param params
     * @param cb
     */
    static getInstance(params: any, cb?: Function): Promise<{
        wrap: FinsembleWindow;
    }>;
    /**
     * @private
     * @param windowName
     */
    static _windowReady: (windowName: string) => Promise<unknown>;
    /**
     * Creates a Finsemble WindowWrap
     * @param {*} params
     * @param {string} params.name The name of the window
     * @param {*} [params.retrievedIdentifier] Retrieved window identifier
     * @param {*} [params.windowIdentifier] The window identifier
     * @param {boolean} [param.setWindowType] If true, will set the window type
     * @private
     */
    static _createWrap(params: any): Promise<{
        wrap: FinsembleWindow;
    }>;
    /**
     * @private
     * @param name
     */
    static _getRemoveWrapChannel(name: any): string;
    /**
     * this routine handles the close event, but also called without event from FSBL
     * @private
     * @param event
     */
    handleWrapRemoveRequest(event?: any): Promise<void>;
    /**
     * Called by FSBLDesktop on a window "unload". This removes all of the established wraps
     * and, importantly, cleans up their router listeners
     */
    static closeAllWraps(): void;
    /**
     * @private
     */
    cleanupRouter(): void;
    /**
     *
     * @param callback
     */
    onReady(callback?: Function): Promise<void>;
    /**
     * @param {string} methodName method name (e.g. "minimize", "maximize")
     * @param {object} params
     * @param {function=} callback
     * @memberof FinsembleWindow
     * @private
     */
    queryWindowService(methodName: string, params: any, callback?: Function): Promise<unknown>;
    /**
     *
     * @param params
     * @param callback
     */
    minimize(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    maximize(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    restore(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    blur(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    focus(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    bringToFront(params?: any | null, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     * Sets the alwaysOnTop state for the window.
     * @param params Objecting representing the new alwaysOnTop state.
     * @param callback Callback accepting two values: a (possible) error object and the alwaysOnTop value for the window.
     */
    setAlwaysOnTop(params?: {
        alwaysOnTop: boolean;
    }, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     * Returns the alwaysOnTop for the window.
     * @param params This parameter is ignored.
     * @param callback Callback invoked with the alwaysOnTop state for the window.
     */
    isAlwaysOnTop(params: {} | undefined, callback: StandardCallback): void;
    /**
     *
     * @param params
     * @param callback
     */
    isShowing(params: {} | undefined, callback: StandardCallback): void;
    /**
     *  Experimental - There is an issue where resizing a window inside a click-through area causes flickering. This issue is present
     * in the electron base code. This implementation may be removed for an alternative solution.
     *
     * Instruct the window to ignore mouse events.
     * Optionally may allow mouse movement events to be forwarded while ignoring interaction events.
     *
     * Returns a promise that resolves to undefined.
     *
     * @param ignore Whether or not to have the window receive mouse events.
     * @param options An optional object with extra configuration parameters.
     * @param options.forward If true indicates mouse movement events are still triggered in the window.
     * @param callback Callback accepting two values: a (possible) error object and success message.
     * @returns {Promise<undefined>}
     * @private
     */
    setIgnoreMouseEvents(ignore: boolean, options?: {
        forward: boolean;
    }, callback?: Function): void;
    /**
     * Defines areas of the window that will be displayed and clickable. All other areas of the window will be transparent.
     * Can be used to create click-through areas of a window.
     *
     * @param params Optional. Takes an array of rectangle Objects for the areas of the window that will be displayed and clickable.
     * Passing in an empty array or omitting this parameter will cause the full area of the window to be displayed and clickable.
     * A rectangle is defined as: {
     * 	x: x coordinate for the origin of the rectangle (integer)
     *  y: x coordinate for the origin of the rectangle (integer)
     *  width: width of the rectangle (integer)
     *  height: height of the rectangle (integer)
     * }
     * @param callback: Function = Function.prototype
     */
    setShape(params?: Array<{
        x: Number;
        y: Number;
        width: Number;
        height: Number;
    } | null>, callback?: Function): void;
    /**
     *
     * @param params
     * @param callback
     * @returns
     */
    addBrowserView(params?: {
        bounds?: {
            left: Number;
            top: Number;
            width: Number;
            height: Number;
        };
        url?: string;
        webContentsName?: string;
        allowAutoResize?: boolean;
    }, callback?: Function): Promise<FinsembleView>;
    /**
     *
     * @param params
     * @param callback
     * @returns
     */
    removeBrowserView(view: FinsembleView, callback?: Function): Promise<void>;
    /**
     *
     * @param params
     * @param callback
     * @returns
     */
    bringViewToFront(view: FinsembleView, callback?: Function): Promise<void>;
    /**
     *
     * @param params
     * @param callback
     * @returns
     */
    setViewBounds(params: {
        view: FinsembleView;
        bounds: {
            left: Number;
            top: Number;
            width: Number;
            height: Number;
        };
    }, callback?: Function): Promise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    setBounds(params?: {
        bounds: Bounds | {};
    }, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     */
    getBounds(cb?: StandardErrorCallback<Bounds>, backwardCompatibilitycb?: StandardErrorCallback<Bounds>): StandardPromise<Bounds>;
    /**
     *
     * @param params
     * @param callback
     */
    updateOptions(params: any, callback?: Function): void;
    /**
     *
     * @param params
     * @param callback
     */
    hide(params?: {}, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     *
     * @param params
     * @param callback
     */
    reload(params?: {}, callback?: Function): void;
    /**
     *
     * @param params
     * @param callback
     */
    show(params?: {}, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     * @private
     * @param params
     * @param callback
     */
    showAt(params?: {}, callback?: Function): void;
    /**
     *
     * @param params
     * @param callback
     */
    close(params?: {}, cb?: StandardErrorCallback<void>): StandardPromise<void>;
    /**
     * @private
     * @param params
     * @param callback
     */
    animate(params?: {}, callback?: Function): void;
    /**
     * Register a window with docking. Use this if you don't want to use the full initialization function.
     *
     * NOTE: The “params” object cannot be removed since assimilationWindowManager.ts invokes initializeWindow
     *       with params which are sent to registerWithDocking
     * @private
     * @param {Object} params - can be anything that is passed to docking for window registration.
     * @param {Function} cb
     * @memberof FSBLWindow
     */
    registerWithDocking(params: {} | undefined, cb: StandardCallback): void;
    /**
     *Open a native file selection dialog on a window
     *
     * @param {Object} params - see https://www.electronjs.org/docs/api/dialog
     * @param {Function} cb
     * @memberof FSBLWindow
     */
    showNativeOpenDialog(params: {} | undefined, cb: StandardCallback): void;
    /**
     *Unregister a window with docking
     * @private
     * @memberof FSBLWindow
     */
    unRegisterWithDocking(): void;
    /**
     *This is if we want to handle the full register/ready state inside of the window
     register with docking
     send the message to launcher saying that component is ready
     * @private
     * @memberof FSBLWindow
     */
    initializeWindow({ manageWindowMovement, identifier }: {
        manageWindowMovement: any;
        identifier: any;
    }, cb?: Function): void;
    /**
     * @private
     */
    wrapReady(): void;
    /**
     *
     * @param params
     * @param callback
     */
    setOpacity(params: any, callback?: Function): void;
    /**
     * Invoked to indicate an operation (e.g. dragging out of tab region) has started. This signals the Docking service to start tracking the mouse location and invoking tiling behavior as needed. Typically inherited (base function only).
     * @param {object} params for future use
     * @private
     * @example
     *	// dragging tab example using tracking and group
     * 	FinsembleWindow.startTabTileMonitoring();
     *	// if dragging tab is in a group, then remove it given tracking results will decide what to do with the window
     * 	FinsembleWindow.Group.getGroupID(this.identifier, function (err, tileGroupId) {
     * 		if (!err) { // if no error then must be in a tile group
     *			self.Group.removeWindow(this.identifier);
     *		}
     *	});
     */
    startTabTileMonitoring(params?: {}): void;
    /**
     * Invoked by client originating a dragStart that it has has ended. Typically inherited (base function only).
     * @param {object} params for future use
     * @param {function=} callback option callback that support overriding default behavior
     * @private
     * 	FinsembleWindow.stopTabTileMonitoring(params, function(err, results, defaultTabTileAction) {
     * 		// . . . custom code goes here . . .
     *		defaultTabTileAction(results); // now take default action or call your own function instead
     * 	});
     *
     */
    stopTabTileMonitoring(params?: {}, callback?: Function): void;
    /**
     * Defines default TabTile action for stopTabTileMonitoring.  May be overridden by client -- see example in stopTabTileMonitoring. Typically inherited (base function only).
     * @private
     * @param {any} stopTabTileResults
     * @memberof FinsembleWindow
     *
     * @private
     */
    defaultTabTileAction(stopTabTileResults: any): void;
    /**
     * @private
     * @param bounds
     */
    mergeBounds(bounds: {
        left?: any;
        right?: any;
        top?: any;
        bottom?: any;
        height?: any;
        width?: any;
    }): void;
    /**
     * @private
     * @param params
     */
    startMove(params?: any): void;
    /**
     * @private
     * @param params
     */
    stopMove(params?: any): void;
    /**
     * Get Monitor for this window
     *
     * @param {function} cb Callback
     */
    getMonitor(cb: Function): void;
    /**
     * Given params, will return the component state. Either the params to search for, or the entire state.
     *
     * @param {object} params
     * @param {string} params.field field
     *  @param {array} params.fields fields
     * @param {function} cb Callback
     */
    getComponentState(params: {
        field?: string;
        fields?: string[];
    }, cb: StandardCallback): void;
    /**
     * Given params, will return the window state. Either the params to search for, or the entire state.
     *
     * @param {object} params
     * @param {string} params.field field
     *  @param {array} params.fields fields
     * @param {function} cb Callback
     */
    getWindowState(params: {
        field?: string;
        fields?: {
            field: string;
        }[];
    }, cb: StandardCallback): void;
    /**
     * Given params, will set the component state. Any fields included will be added to the state
     *
     * @param {object} params
     * @param {string} params.field field
     * @param {array} params.fields fields
     * @param {function} cb Callback
     */
    setComponentState(params: {
        field?: string;
        fields?: {
            field: string;
            value: any;
        }[];
        value?: any;
    }, cb?: StandardCallback): void;
    /**
     * Removes one or more specified attributes from either component or window state in storage
     * for this window.
     *
     * In addition to the name of the window, params should include either a `field`
     * property as a string or a `fields` property as an array of strings.
     *
     * @param {object} params
     * @param {string} [params.field] field
     * @param {array} [params.fields] fields
     * @param {function} cb Callback
     */
    removeComponentState(params: {
        field?: string;
        fields?: {
            field: string;
        }[];
        windowName?: string;
    }, cb?: StandardCallback): void;
    /**
     * Given params, will set the window state. Any fields included will be added to the state
     * @private
     * @param {object} params
     * @param {string} params.field field
     *  @param {array} params.fields fields
     * @param {function} cb Callback
     */
    setWindowState(params: {
        field?: string;
        fields?: {
            field: string;
        }[];
    }, cb?: StandardCallback): void;
    /**
     * @private
     * @param params
     * @param cb
     */
    saveCompleteWindowState(params?: {}, cb?: Function): void;
    /**
     *Cancels startTabTileMonitoring. Example use is a user "escapes" out of a drag operation.
     * @private
     * @param {object} params for future use
     * @memberof FinsembleWindow
     */
    cancelTabTileMonitoring(params?: {}): void;
    /**
     * Return the parent window's wrapper (e.g. StackedWindow).
     *
     */
    getParent(cb: StandardCallback): void;
    /**
     * Sets the parent window (e.g. stackedWindow) and emits "setParent" event to window listeners.
     *
     * @param {object} stackedWindowIdentifier identifier of window to set as parent (e.g. stackedWindowIdentifier).
     *
     */
    setParent(stackedWindowIdentifier: any, cb?: StandardCallback): Promise<unknown>;
    /**
     * Sets the parent window (e.g. stackedWindow) on a window wrap.
     * This is for the case where a window already has a parent but it's wrap doesn't know about it.
     * @private
     * @param {object} stackedWindowIdentifier identifier of window to set as parent (e.g. stackedWindowIdentifier).
     *
     */
    setParentOnWrap(stackedWindowIdentifier: any, cb?: Function): void;
    /**
     * Clears the parent reference and emits "clearParent" event to window listeners. Used only internally.
     *
     * @private
     *
     */
    clearParent(): void;
    /**
     *
     * @param title
     */
    setTitle(title: string): void;
    /**
     *
     * @param cb
     */
    getOptions(cb?: StandardErrorCallback<WindowOptions>): StandardPromise<WindowOptions>;
    /**
     * Handles common housekeeping checks and modifications on params at the beginning of each private window-management function
     *
     * @param {string} methodName method name (e.g. "minimize", "maximize")
     * @param {object} params
     * @memberof StackedWindow
     * @private
     */
    _privateManagementPreface(methodName: string, params: any): any;
    /**
     * Adds window as a child to a stacked window.  Adds to the top of the stack, or if specified to a specific location in the stack;
     *
     * @param {object=} params
     * @param {object} params.stackedWindowIdentifier stacked window to operate on stacked window to operate on
     * @param {object} params.windowIdentifier window to add
     * @param {number=} params.position the location in the stack to push the window.  Location 0 is the bottom of the stack. Defaults to the top of stack.
     * @param {boolean=} params.noSave if true then don't save the store after updating it (will be saved by caller)
     * @param {function=} callback function(err)
     * @memberof StackedWindow
     */
    addWindow(params: any, callback?: Function): Promise<unknown>;
    /**
     * Removes a child window from a stacked window.  If removed window was visible, then the bottom child window (position 0) in stack will be made visible.
     *
     * @param {object} params
    .* @param {object} params.stackedWindowIdentifier stacked window to operate on
     * @param {object} params.windowIdentifier window to remove
     * @param {boolean=} params.noDocking if true then do not register removed window with docking (the workspace is unaffected)
     * @param {function=} callback function(err)
     * @memberof StackedWindow
     */
    removeWindow(params: any, callback?: Function): Promise<unknown>;
    /**
     * Removes a window from the stack then closes it.  If removed window was visible, then the bottom child window (position 0) in stack will be made visible.
     *
     * @param {object} params
     * @param {object} params.stackedWindowIdentifier stacked window to operate on
     * @param {object} params.windowIdentifier window to delete
     * @param {function=} callback function(err)
     * @memberof StackedWindow
     * @private
     */
    deleteWindow(params: any, callback?: Function): Promise<unknown>;
    /**
     * Sets the visible window within the stack.  The previously visible window in stack will be automatically hidden.
     *
     * @param {object} params
     * @param {object} params.stackedWindowIdentifier stacked window to operate on
     * @param {object} params.windowIdentifier
     * @param {function=} callback function(err)
     * @memberof StackedWindow
     */
    setVisibleWindow(params: any, callback?: Function): Promise<unknown>;
    /**
     * Reorders the stack, but odes not affect visibility
     *
     * @param {object} params
     * @param {object} params.stackedWindowIdentifier stacked window to operate on
     * @param {array} params.windowIdentifiers array of windowIdentifiers which provides the new order
     * @param {function=} callback function(err)
     * @memberof StackedWindow
     */
    reorder(params: any, callback?: Function): Promise<unknown>;
    /**
     * Form a docking group with any adjacent windows
     */
    formGroup(): void;
    /**
     * Leave a docking group
     */
    ejectFromGroup(): void;
}
//# sourceMappingURL=FinsembleWindow.d.ts.map