import DockingCalculator from "./dockingCalculator";
import AutoArrange from "../MultiWindowFeatures/autoArrange";
import DockableWindow from "./dockableWindow";
import { MonitorDimensions, DockingConfigOptions, BoxCoordinates, CompleteBounds } from "./types";
import { FSBLWindow } from "../types";
import { Monitors } from "../../../common/Monitors";
import DockableGroup from "./dockableGroup";
import { VirtualScreenCoordinates } from "../../../FEA";
import { DockableMonitor } from "./dockableMonitor";
declare class DockingMain extends DockingCalculator {
    /** @alias DockingMain# */
    AutoArrange: AutoArrange;
    cachedPositions: Record<string, Record<string, any>>;
    registrationPending: Record<string, boolean>;
    deregistrationPending: Record<string, any>;
    tabbingEnabled: boolean;
    tilingEnabled: boolean;
    enableWindowsAeroSnap: boolean;
    defaultHeight: number;
    defaultWidth: number;
    activeWorkspace: {
        name: string;
        guid: string;
    };
    dockingReady: boolean;
    isWindows: boolean;
    applicationState: string;
    recallToDock?: any;
    claimSpace: boolean;
    mouseTracking: boolean;
    mouseTracker: {
        interval?: ReturnType<typeof setInterval>;
        mousePosition?: VirtualScreenCoordinates;
        callback?: Function;
    };
    tilingAndTabbingWindow?: FSBLWindow;
    operation?: {
        window?: DockableWindow;
        group?: DockableGroup;
        sourceWindowName?: string;
        type?: string;
        tileWith?: string;
        edge?: string | false;
        newBounds?: {
            maskBounds: any;
            newWindowBounds: any;
        };
    };
    configCache: Record<string, any>;
    serviceConfig: DockingConfigOptions;
    constructor(params: any, monitorsInstance: Monitors);
    bindAllFunctions(): void;
    defaultDockingOptions(options: any, MIN_HEIGHT: any, MIN_WIDTH: any): DockingConfigOptions;
    windowServiceChannelName(channelTopic: any): string;
    /**
     * Function that sets wether tabbing or tiling is disabled for this instance of DockingMain
     *
     * @param {object} serviceConfig The service config
     */
    setTilingOrTabbingEnabled(setTilingOrTabbingEnabledArg: any): void;
    /**
     * Function that runs after a window has completed a move action
     *
     * @param {object} win The window object
     * @param {boolean} triggeredByAutoArrange True if the move was triggered by auto arrange. If the move was triggered by auto arrange, we don't want to delete cached window positions.
     */
    onMoveComplete(win: {
        name: string;
        monitor: DockableMonitor;
    }, triggeredByAutoArrange: boolean): void;
    updateGroupData(): void;
    /**
     * Handler for incoming docking deregistration request for specified window.
     * Invoked both by addListener("DockingService.registerWindow") and addListener("DockingService.deregisterWindow").
     * @private
     */
    deregisterWindow(self: any, err: any, response: any): void;
    /**
     * Given a window name, reset the auto arrange status for the monitor that window is on
     * @param {object | string} window A window name or docking window object
     */
    resetAutoArrangeForAWindowsMonitor(window: any): void;
    /**
     *  Helper function that determines whether a group should fill holes left by windows that leave it.
     * @params {dockableGroup} grp The group for which to fill holes (or not).
     */
    shouldFillHolesInGroups(grp: any): boolean | undefined;
    /**
     * When a window no longer delegates its movement to us (it closes or unregisters for some reason), we need to make sure we don't leave strange, disconnected groups out there.
     * If you imagine [A][B][C], and B is closed, this code will make sure that A & C don't remain grouped.
     * @param {*} grp
     */
    fixGroupMembership(grp: any): void;
    onWindowClosed(err: any, response: any): void;
    /**
     * Creates router endpoints for all of our client APIs. Add servers or listeners for requests coming from your clients.
     * @private
     */
    createRouterEndpoints(): void;
    /**
     * Check if new group is a launchGroup component, i.e. there's a window with launchGroupComponentData in its windowDescriptor.
     * If the groups is a launchGroup component then add the launchGroupCompoenentData to the new member of the group.
     *
     * Note: We break early as we only want to find the first component to have a launchGroupComponentData.
     *
     * @param {string} windowNameToAddToGroup The window name to add to the group
     * @param {Array<string>} groupWindowNames All window names in the group
     */
    _maybeAddLaunchGroupComponentData(windowNameToAddToGroup: string, groupWindowNames: string[]): void;
    /**
     * Invoked when a window leaves a group. Checks if we have launchGroupComponentData to remove and
     * removes it. Does nothing otherwise.
     *
     * @param {wrap} leavingWindow The window leaving the group.
     */
    _removeLaunchGroupComponentDataFromLeavingWindow(leavingWindow: any): void;
    buildWorkspaceGroupUpdate(): {
        groupName: string;
        groupData: {};
        workspaceName: string;
    };
    buildGroupUpdate(): {
        groupName: string;
        groupData: {};
        workspaceName: string;
        guid: string;
    };
    sendQueryResponse(message: any, data: any): void;
    prepMonitorDimensions(monitorName: string | undefined): MonitorDimensions | null;
    /**
     * Called when monitors' state changes. Either a monitor has been added/removed or rearranged.
     * When a change occurs query the system for the new window position and update the bounds.
     * Groups need special treatment to ensure that they stay together.
     * The toolbar is also a special case because it needs to stay the same size and keep it's docking state
     * @param {object} monitors An object containing each monitor with monitor name as keys
     */
    monitorsChanged(eventData: any): Promise<void>;
    /**
     * Handles the docked toolbar after a monitor change occurs.
     * Make sure it remains docked at the correct location and size
     * @param {} win - window that is docked, usually the toolbar
     */
    handleDockedWindow(boundsObject: {
        name: string;
    }): Promise<void>;
    /**
     * Checks if a monitor still exists
     * Used for adjusting window location after a monitor change were we want to prioritize the current monitor
     */
    getUpdatedWindowMonitorIfItExists(dockableMonitor: any): DockableMonitor | undefined;
    /**
     * Returns the updated monitor for a window or a new monitor
     * if the current one for the window no longer exists.
     * @param {FinsembleWindow} win Finsemble window
     */
    getUpdatedOrNewMonitor(win: DockableWindow): DockableMonitor | undefined;
    /**
     * Loops through DockableMonitor(s) and compares against a system monitor passed in.
     *
     * @param {*} mon A monitor representation
     * @returns A dockable monitor which contains the same deviceId as the monitor passed in
     */
    getDockingMonitorFromSystemMonitor(mon: any): any;
    /**
     * Updates monitor info with claim space changes (usually triggered by docking/undocking toolbar or adding/removing monitors)
     * @param {*} monitorUpdate The new monitor information
     * @param {boolean} isDockableWindowAction If this action is triggered by a dockable window, we don't want to wipe out auto arrange status
     */
    updateMonitorInfo(monitorUpdate: any, isDockableWindowAction?: any): void;
    /**
     * This function will maximize a window.
     * @param {object} params
     * @param {object} params.windowIdentifier
     * @param {string} params.name
     */
    maximizeWindow(params: any, cb: any): void;
    /**
     * This function will restore a maximized window.
     * @param {object} params
     * @param {string} params.name
     */
    restoreFromMaximize(params: any, cb?: Function): Promise<void>;
    onWindowShown(event: any): void;
    onWindowHidden(event: any): void;
    onWindowClosedHandler(event: any): void;
    /**
     * Function that's called after a window is moved.
     */
    /**
     * Registers a window with the DockingCalculator.
     * @param  {dockableWindow} win
     * @return {Promise}
     */
    addWindow(win: FSBLWindow): Promise<unknown>;
    setWindowMinimized(event: any): void;
    setWindowFocused(event: any): void;
    bringGroupToFront(event: any): void;
    hyperFocus(params: any): void;
    initiateGroupMaskCreation(): Promise<void>;
    removeWindow(windowName: string): void;
    /**
     * Sets the initial buffer size.
     */
    setupDockingCalculator(): void;
    addMonitor(monitor: any, isDockableWindowAction: any): void;
    setGroupMode(groupMode: any): void;
    setWindowsAeroSnap(setWindowsAeroSnapArg: any): void;
    /** **********************************************
     *												*
     * 				Debugging Helpers				*
     *												*
     *********************************************** */
    /**
     * For debugging.
     * @function {function name}
     * @return {type} {description}
     */
    getGridWindows(): void;
    /**
     * @function {function name}
     * @return {type} {description}
     */
    logger(): void;
    /**
     * returns true if intersection in groups
     */
    isACommonGroup(firstSet: any, secondSet: any): any;
    /**
     * Sends a message asking windows to save their position.  If window is in a group, then all windows in same group are told; otherwise, only the independent window is told
     * @returns true if window that changed was in a group (which also changed)
     */
    tellWindowOrGroupToSaveLocation(changedWindow: any): boolean;
    /**
     * Sends a message asking windows to update their position in memory but not save.
     */
    tellWindowsToUpdateLocation(): void;
    /**
     * Updates the groupData object, which is pushed out to components.
     * Returns true if the groupData has changed, else false.
     */
    _updateGroupData(): boolean;
    /**
     * Sends the groupData object out to the rest of the application.
     */
    publishGroupUpdate(): void;
    handleWorkspaceUpdate(err: any, response: any): void;
    /**
     * Checks to see if a window belongs to any groups.
     */
    checkIfWindowIsInGroup(name: string): void;
    /**
     * Sends the update to all toolbars.
     */
    sendAutoArrangeStatusUpdate(): void;
    /**
     * @private
     * @param {LauncherClient~windowDescriptor} windowDescriptor
     * @param {monitorDimensions} monitorDimensions
     * @returns {boolean} Whether window is on the current monitor.
     */
    windowOnMonitor(windowDescriptor: any, monitorDimensions: any): boolean;
    /**
     * Get bounds for a window.
     */
    getBounds(params: any, cb?: Function): BoxCoordinates;
    deregisterAllWindows(): Promise<void>;
    getMouseInGroups(mousePosition: VirtualScreenCoordinates): Promise<{
        movableGroups: DockableGroup[];
        immobileGroups: DockableGroup[];
    }>;
    getMouseInWindows(mousePosition: any): Promise<DockableWindow[]>;
    startTrackingMouse(interval: any, cb?: Function): void;
    stopTrackingMouse(cb: any): void;
    /**
     * Check if we are near the edge of a rectangle within x% or xpx
     * Returns the edge that we're nearest or false if we're not within range of any edge
     */
    isPositionNearEdge(position: any, bounds: any, tolerance: any, toleranceType?: string): string | false;
    identifierForTilingOrTabbing(err: any, response: any): void;
    private setSwap;
    /**
     * Returns true if the tiling operation is set (false if the window dimensions make it invalid)
     */
    private setTiling;
    private setTilingGroup;
    private relations;
    private maybeSetOperation;
    private didNotFindAGroupTile;
    private handleNotTabbing;
    runScrimShower(edge: string, bounds: CompleteBounds): {
        maskBounds: {
            left: number;
            top: number;
            right: number;
            bottom: number;
            width: number;
            height: number;
        };
        newWindowBounds: {
            left: number;
            top: number;
            right: number;
            bottom: number;
            width: number;
            height: number;
        };
    } | undefined;
    private areWeTabbing;
    /**
     * Checks if mousePosition is in group or window
     */
    private boundsChecker;
    startTilingOrTabbing(err: any, response: any, sourceWin?: FSBLWindow): void;
    cancelTilingOrTabbing(): void;
    buildSnapRelationshipsForGroup(group: any): void;
    getFillHolesFor(sourceWindow: any): DockableGroup[];
    fillHoles(group: DockableGroup, bounds: BoxCoordinates): Promise<void>;
    actualStopTilingRequestMove({ sourceWindow, placement, groupNames, fillHolesFor, operation, oldBounds, }: {
        sourceWindow: any;
        placement: any;
        groupNames: string[];
        fillHolesFor: DockableGroup[];
        operation: any;
        oldBounds: any;
    }): void;
    actualStopTiling(params: any, fillHolesFor: DockableGroup[], sourceWindow: any): void;
    actualStopSwapping(sourceWindow: any, operation: any): void;
    actualStopDetaching(fillHolesFor: DockableGroup[], sourceWindow: any, operation: any, mousePosition: any): void;
    actualStopTabbing(fillHolesFor: DockableGroup[], sourceWindow: any): void;
    actualStopTilingOrTabbing(params: any, callback: any): void;
    stopTilingOrTabbing(err: any, response: any, callback: any): void;
    private maybeAssimilationFailed;
    initialize(): Promise<void>;
}
export default DockingMain;
//# sourceMappingURL=dockingMain.d.ts.map