import { Forest, ForestChangeItem, ForestItem } from './types/item-forest';
interface Projection {
    depth: number;
    maxDepth: number;
    minDepth: number;
    parentId: string;
}
declare type GetProjection = (items: ForestItem[], activeIndex: number, targetIndex: number, dragOffset: number, indentationWidth: number) => Projection;
export declare function isNil<T = any>(value: T): boolean;
export declare function simpleDeepClone<T = any>(value: T): T;
declare type MoveFormater<T> = (array: T[]) => T[];
declare type ArrayMove<T = any> = (array: T[], from: number, to: number, childCount?: number, format?: MoveFormater<T>) => T[];
declare type ArrayRemove<T = any> = (array: T[], index: number) => T[];
declare type ArrayPushByIndex<T = any> = (array: T[], index: number, item: T) => T[];
/**
 * Move an array item to a different position. Returns a new array with the item moved to the new position.
 */
export declare const arrayMove: ArrayMove;
export declare const arrayPushByIndex: ArrayPushByIndex;
export declare const arrayRemove: ArrayRemove;
/**
 * 查找祖先
 * 代替 findItemDepth
 * 通过祖先数量可得出深度
 */
export declare function getAncestors(items: ForestItem[], parentId: string): string[];
/**
 * 移动层级Item，带有业务逻辑的arrayMove
 * 直接修改缓存中的数据
 */
export declare function arrayMoveItem(array: ForestItem[], from: number, to: number, projection: Projection): ForestItem[];
export declare function shouldRenderHandle(argColumns: any[], tableColumnLength: number): boolean;
declare type CalcDeptFunc = (depth: number) => number;
export declare const getCalcDeptFuncByItemDepth: (originalItem: ForestChangeItem, currentItem: ForestChangeItem) => CalcDeptFunc;
export declare const getItemDepthByForest: (itemId: string, { rows, depths }: Forest) => number;
export declare function getSubItemCountByDepth(items: ForestItem[], itemId: string): number;
export declare function getSubItemCountByForestDepth(depths: number[], itemIndex: number): number;
export declare const getAncestorsByForestDepth: (depths: number[], itemIndex: number) => number[];
/**
 * 通过层级数据获取父级Index
 * @param {*} forest  层级数据
 * @param {string} itemIndex 事项index
 * @returns {string|null} 父级index
 */
export declare const getParentIndexByForestDepth: (depths: number[], currentIndex: number) => number;
export declare function getSubItemCountByForest(forest: Forest, itemId: string): number;
/**
 * 处理move过程中，Item深度的变化
 */
export declare function countDepthWith(items: ForestItem[]): ForestItem[];
/**
 * 获取拖拽深度
 * 通过缩进和偏移量计算出偏移深度
 */
export declare function getDragDepth(offset: number, indentationWidth: number): number;
export declare const getProjection: GetProjection;
export declare function findItem(items: ForestItem[], itemId: string): ForestItem;
export declare function findItemIndex(items: ForestItem[], itemId: string): number;
export declare function getSubItemCountByAncestors(items: ForestItem[], parentId: string): number;
export {};
