import { WindowIdentifier, WindowDescriptor } from "../services/window/types";
import { FEAWindow } from "../FEA";
export declare function clone(from: any, to?: any): any;
/**
 * <h2>Finsemble Utility Functions</h2>
 */
export declare function isPercentage(val: any): boolean;
export declare function crossDomain(url: string): boolean;
/**
 * Returns a finWindow or null if not found
 * @param  windowIdentifier A window identifier
 * @param  cb Optional callback containing finWindow or null if not found (or use Promise)
 * @return Promise that resolves to a finWindow or rejects if not found
 */
export declare function getFinWindow(windowIdentifier?: WindowIdentifier, cb?: (remoteWindow: FEAWindow | null) => void): Promise<FEAWindow>;
/**
 * Retrieves a windowDescriptor given a windowIdentifier
 * @param windowIdentifier The window to locate. If empty then the current window is returned.
 * @param cb Function to retrieve result (optional or use Promise)
 * @return A promise that resolves to a WindowDescriptor
 */
export declare function getWindowDescriptor(windowIdentifier?: WindowIdentifier, cb?: (windowDescriptor: WindowDescriptor | null) => void): Promise<WindowDescriptor>;
/**
 * Returns a windowIdentifier for the current window
 * @param cb Callback function returns windowIdentifier for this window (optional or use Promise)
 * @returns A promise that resolves to a windowIdentifier
 */
export declare const getMyWindowIdentifier: (cb?: ((windowIdentifier: WindowIdentifier) => void) | undefined) => Promise<WindowIdentifier>;
/**
 * @returns Transforms an array of strings into a camel cased string.
 * @memberof Utils
 */
export declare function camelCase(...args: string[]): string;
export declare function isWindows(cb?: (osIsWindows: boolean) => void): Promise<boolean>;
/**
 * Calculates windowType for a newly spawned window
 * windowType can be set or overwritten in many ways. The intention here is to end up with a limited set of
 * final windowTypes
 * @export
 * @param config Object containing all possible values used to set windowTypes, some of these values may be unset depending on the execution path
 */
export declare function getWindowType(config: any): string;
/**
 * For the DOM element that has been passed in, this function returns a bounding box that is relative
 * to the virtual monitor space. That is, it returns the position of the DOM element on the desktop.
 * @param {HTMLElement|string} element A selector or HTMLElement
 */
export declare const getDesktopBoundingBox: (element: string | Element) => Promise<{
    top: number;
    left: number;
    width: number;
    height: number;
    right: number;
    bottom: number;
}>;
export declare const isPointInBox: (point: {
    x: number;
    y: number;
}, box: {
    top: number;
    left: number;
    bottom?: number;
    right?: number;
    width: number;
    height: number;
}) => boolean;
/**
 * Returns (via callback) true if the mouse is currently located (hovering) over the requested element.
 * @param element The element, or a selector, to check
 * @param cb A function that returns a boolean
 */
export declare const isMouseOverDOMElement: (element: Element, cb?: Function) => Promise<boolean>;
export declare const fastClone: (obj: any) => any;
/** Returns exactly what's passed to it. Useful for higher-order functions. */
export declare function identity<T>(arg: T): T;
/**
 * Wraps a callback accepting function in a promise. The callback must have the type
 * specified in StandardCallback, and the wrapped function *MUST* call the callback
 * on all possible code paths.
 */
export declare function promisify<T = any>(f: any, thisContext?: any): (...args: any[]) => Promise<T>;
/**
 * Creates a promise that rejcts after the specified time with
 * the given message.
 */
export declare function timeoutPromise(ms: any, message: string): Promise<unknown>;
/**
 * Wraps a promise in another promise that either rejects after the specified number of milliseconds
 * or resolves with the result of the promise.
 */
export declare function wrapWithTimeout<T>(promise: Promise<T>, ms: number, message: string): Promise<T>;
/**
 * Will determine if a given window is a StackedWindow. Returns true if the window is a
 * StackedWindow, false otherwise
 * @param {FinsembleWindow} win The window to check for StackedWindow
 */
export declare function isStackedWindow(win: any): any;
/**
 * Deep equal doesn't work properly if the objects aren't exactly equal
 * We have several places in the code that attach extra parameters to bounds objects
 * This function will test equality on bounds for the only left, right, top, bottom, width and height
 * @param {} bounds1
 * @param {*} bounds2
 */
export declare function checkIfBoundsAreEqual(bounds1: any, bounds2: any): boolean;
/**
 * Uses set timeout to provide a mechanism like sleep. e.g. await sleep(1000). Can be used in conjunction with Promise.race to implement timeouts.
 *
 * @export
 * @param {Number} ms number of milliseconds to wait for
 * @param {Boolean} rejectPromise if true, will reject instead of resolving the promise
 * @returns
 */
export declare function sleep(ms: any, rejectPromise?: boolean): Promise<unknown>;
/**
 * Like isEqual but Array order is ignored
 * @param value1
 * @param value2
 */
export declare const isEqualIgnoringArrayOrder: (value1: any, value2: any) => boolean;
//# sourceMappingURL=util.d.ts.map