import { CompactType, Layout, LayoutItem, Layouts, Position } from './types';
export declare const noop: () => void;
/**
 * Return the bottom coordinate of the layout.
 * @param  {Array} layout Layout array.
 * @returns {Number}       Bottom coordinate.
 */
export declare function bottom(layout: Layout, colapsedHeight: number, rowHeight: number): number;
/**
 * TODO: Documentar
 */
export declare function cloneLayoutItem(layoutItem: LayoutItem, layoutItemReplaceProps?: Partial<Exclude<LayoutItem, 'i'>>): LayoutItem;
/**
 * TODO: Documentar
 */
export declare function cloneLayout(layout: Layout, layoutItemReplaceProps?: Partial<Exclude<LayoutItem, 'i'>>): Layout;
/**
 * Given two layoutitems, check if they collide.
 */
export declare function collides(l1: LayoutItem, l2: LayoutItem, colapsedHeight: number, rowHeight: number): boolean;
/**
 * Compact an item in the layout.
 *
 * Modifies item.
 *
 */
export declare function compactItem(compareWith: Layout, l: LayoutItem, compactType: CompactType, cols: number, fullLayout: Layout, colapsedHeight: number, rowHeight: number, allowOverlap?: boolean): LayoutItem;
/**
 * Given a layout, compact it. This involves going down each y coordinate and removing gaps
 * between items.
 *
 * Does not modify layout items (clones). Creates a new layout array.
 * @param  {Array} layout Layout.
 * @param  {CompactType} compactType
 * @param  {Boolean} allowOverlap When `true`, allows overlapping grid items.
 * @returns {Array}       Compacted Layout.
 */
export declare function compact(layout: Layout, compactType: CompactType, cols: number, colapsedHeight: number, rowHeight: number, allowOverlap?: boolean): Layout;
/**
 * Get a layout item by ID. Used so we can override later on if necessary.
 * @param  {Array}  layout Layout array.
 * @param  {String} id     ID
 * @returns {LayoutItem}    Item at ID.
 */
export declare function getLayoutItem(layout: Layout, id: string): LayoutItem | undefined;
/**
 * Get all static elements.
 * @param  {Array} layout Array of layout objects.
 * @returns {Array}        Array of static layout items..
 */
export declare function getStatics(layout: Layout): Array<LayoutItem>;
export declare function fastPositionEqual(a: Position, b: Position): boolean;
/**
 * TODO: Documentar
 */
export declare function getAllCollisions(layout: Layout, layoutItem: LayoutItem, colapsedHeight: number, rowHeight: number): Array<LayoutItem>;
/**
 * Returns the first item this layout collides with.
 * It doesn't appear to matter which order we approach this from, although
 * perhaps that is the wrong thing to do.
 * @param  {Object} layoutItem Layout item.
 * @returns {Object|undefined}  A colliding layout item, or undefined.
 */
export declare function getFirstCollision(layout: Layout, layoutItem: LayoutItem, colapsedHeight: number, rowHeight: number): LayoutItem | undefined;
/**
 * TODO: Documentar
 */
export declare function modifyLayout(layout: Layout, layoutItem: LayoutItem): Layout;
/**
 * This is where the magic needs to happen - given a collision, move an element away from the collision.
 * We attempt to move it up if there's room, otherwise it goes below.
 * @param  {Array} layout            Full layout to modify.
 * @param  {LayoutItem} collidesWith Layout item we're colliding with.
 * @param  {LayoutItem} itemToMove   Layout item we're moving.
 */
export declare function moveElementAwayFromCollision(layout: Layout, collidesWith: LayoutItem, itemToMove: LayoutItem, isUserAction: boolean, compactType: CompactType, cols: number, colapsedHeight: number, rowHeight: number): Layout;
/**
 * Move an element. Responsible for doing cascading movements of other elements.
 *
 * Modifies layout items.
 * @param  {Array}      layout            Full layout to modify.
 * @param  {LayoutItem} l                 element to move.
 * @param  {Number}     [x]               X position in grid units.
 * @param  {Number}     [y]               Y position in grid units.
 */
export declare function moveElement(layout: Layout, l: LayoutItem, x: number | undefined, y: number | undefined, isUserAction: boolean, preventCollision: boolean, compactType: CompactType, cols: number, colapsedHeight: number, rowHeight: number, allowOverlap: boolean): Layout;
/**
 * Helper to convert a number to a percentage string.
 * @param  {Number} num Any number
 * @returns {String}     That number as a percentage.
 */
export declare function perc(num: number): string;
/**
 * TODO: Documentar
 */
export declare function setTransform({ top, left, width, height }: Position): Record<string, any>;
/**
 * TODO: Documentar
 */
export declare function setTopLeft({ top, left, width, height }: Position): Record<string, any>;
/**
 * Sort layout items by row ascending and column ascending.
 *
 * Does not modify Layout.
 */
export declare function sortLayoutItemsByRowCol(layout: Layout): Layout;
/**
 * Sort layout items by column ascending then row ascending.
 *
 * Does not modify Layout.
 */
export declare function sortLayoutItemsByColRow(layout: Layout): Layout;
/**
 * Get layout items sorted from top left to right and down.
 * @returns {Array} Array of layout objects.
 * @returns {Array}        Layout, sorted static items first.
 */
export declare function sortLayoutItems(layout: Layout, compactType: CompactType): Layout;
/**
 * TODO: Documentar
 */
export declare function withLayoutItem(layout: Layout, itemKey: string, cb: (l: LayoutItem) => LayoutItem): [Layout, LayoutItem | undefined];
/**
 * Given a layout, make sure all elements fit within its bounds.
 *
 * Modifies layout items.
 * @param  {Array} layout Layout array.
 * @param  {Number} bounds Number of columns.
 */
export declare function correctBounds(layout: Layout, bounds: {
    cols: number;
}, colapsedHeight: number, rowHeight: number): Layout;
/**
 * TODO: Documentar
 */
export declare function getH(h: number, colapsedHeight: number, rowHeight: number, colapsed?: boolean): number;
/**
 * TODO: Documentar
 */
export declare function getLayoutItemH(layoutItem: LayoutItem, colapsedHeight: number, rowHeight: number): number;
/**
 * TODO: Documentar
 */
export declare function isEqualLayoutItem(layoutA: LayoutItem, layoutB: LayoutItem): boolean;
/**
 * TODO: Documentar
 */
export declare function isEqualLayout(layoutA: Layout, layoutB: Layout): boolean;
/**
 * TODO: Documentar
 */
export declare function isEqualLayouts(layoutsA: Layouts, layoutsB: Layouts): boolean;
//# sourceMappingURL=utils.d.ts.map