import { ITreeNodeProps } from '../composable/treeNode';
import { NTree } from '../interface';
import { ITreeProps } from '../composable';
import { VueNode } from '../../../utils';
type TExternalGetKey = GetKey<NTree.IDataNode> | string;
interface IWrapper {
    posEntities: Record<string, any>;
    keyEntities: Record<any, any>;
}
export type GetKey<RecordType> = (record: RecordType, index?: number) => NTree.TKey;
export declare function convertDataToEntities(dataNodes: NTree.IDataNode[], { initWrapper, processEntity, onProcessFinished, externalGetKey, childrenPropName, fieldNames }?: {
    initWrapper?: (wrapper: IWrapper) => IWrapper;
    processEntity?: (entity: NTree.IDataEntity, wrapper: IWrapper) => void;
    onProcessFinished?: (wrapper: IWrapper) => void;
    externalGetKey?: TExternalGetKey;
    childrenPropName?: string;
    fieldNames?: NTree.IFieldNames;
}): {
    posEntities: any;
    keyEntities: any;
};
/**
 * Convert `children` of Tree into `treeData` structure.
 */
export declare function convertTreeToData(rootNodes: VueNode): NTree.IDataNode[];
interface ITraverseConfig {
    childrenPropName?: string;
    externalGetKey?: TExternalGetKey;
    fieldNames?: NTree.IFieldNames;
}
export declare function traverseDataNodes(dataNodes: NTree.IDataNode[], callback: (data: {
    node: NTree.IDataNode;
    index?: number;
    pos: string;
    key: NTree.TKey;
    parentPos?: string | number | null;
    level?: number;
    nodes: NTree.IDataNode[];
}) => void, config?: ITraverseConfig | string): void;
/**
 * If user use `autoExpandParent` we should get the list of parent node
 * @param keyList
 * @param keyEntities
 */
export declare function conductExpandParent(keyList: NTree.TKey[], keyEntities: Record<NTree.TKey, NTree.IDataEntity>): NTree.TKey[];
/**
 * Flat nest tree data into flatten list. This is used for virtual list render.
 * @param treeNodeList Origin data node list
 * @param expandedKeys
 * @param fieldNames
 * need expanded keys, provides `true` means all expanded.
 */
export declare function flattenTreeData(treeNodeList: NTree.IDataNode[], expandedKeys: NTree.TKey[] | true, fieldNames: NTree.IFieldNames): NTree.IFlattenNode[];
export declare function fillFieldNames(fieldNames?: NTree.IFieldNames): Required<NTree.IFieldNames>;
/**
 * Get TreeNode props with Tree props.
 */
export declare function getTreeNodeProps<TreeDataType extends NTree.IBasicDataNode = NTree.IDataNode>(key: NTree.TKey, { expandedKeysSet, selectedKeysSet, loadedKeysSet, loadingKeysSet, checkedKeysSet, halfCheckedKeysSet, dragOverNodeKey, dropPosition, keyEntities }: NTree.ITreeNodeRequiredProps<TreeDataType>): {
    eventKey: NTree.TKey;
    expanded: boolean;
    selected: boolean;
    loaded: boolean;
    loading: boolean;
    checked: boolean;
    halfChecked: boolean;
    pos: string;
    parent: NTree.IDataEntity<TreeDataType> | undefined;
    dragOver: boolean;
    dragOverGapTop: boolean;
    dragOverGapBottom: boolean;
};
export declare function calcDropPosition<TreeDataType extends NTree.IBasicDataNode = NTree.IDataNode>(event: MouseEvent, dragNode: NTree.TDragNodeEvent, targetNode: NTree.TDragNodeEvent, indent: number, startMousePosition: {
    x: number;
    y: number;
}, allowDrop: NTree.TAllowDrop<TreeDataType>, flattenedNodes: NTree.IFlattenNode[], keyEntities: Record<NTree.TKey, NTree.IDataEntity<TreeDataType>>, expandKeysSet: Set<NTree.TKey>): Omit<NTree.IDragState, 'draggingNodeKey' | 'dragChildrenKeys'>;
/**
 * Return selectedKeys according with multiple prop
 * @param selectedKeys
 * @param props
 * @returns [string]
 */
export declare function calcSelectedKeys(selectedKeys: NTree.TKey[], props: ITreeProps): NTree.TKey[] | undefined;
/**
 * Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style
 */
export declare function parseCheckedKeys(keys: NTree.TKey[] | {
    checked: NTree.TKey[];
    halfChecked: NTree.TKey[];
}): {
    checkedKeys: NTree.TKey[];
    halfCheckedKeys: undefined;
} | {
    checkedKeys: NTree.TKey[];
    halfCheckedKeys: NTree.TKey[];
} | null;
export declare function getDragChildrenKeys<TreeDataType extends NTree.IBasicDataNode = NTree.IDataNode>(dragNodeKey: NTree.TKey, keyEntities: Record<NTree.TKey, NTree.IDataEntity<TreeDataType>>): NTree.TKey[];
export declare function getKey(key: NTree.TKey, pos: string): NTree.TKey;
export declare function getPosition(level?: string | number, index?: number): string;
export declare function isTreeNode(node: NTree.TNodeElement): any;
export declare function arrDel(list: NTree.TKey[], value: NTree.TKey): NTree.TKey[];
export declare function arrAdd(list: NTree.TKey[], value: NTree.TKey): NTree.TKey[];
export declare function posToArr(pos: string): string[];
export declare function isLastChild<TreeDataType extends NTree.IBasicDataNode = NTree.IDataNode>(treeNodeEntity?: NTree.IDataEntity<TreeDataType>): boolean;
export declare function isFirstChild<TreeDataType extends NTree.IBasicDataNode = NTree.IDataNode>(treeNodeEntity?: NTree.IDataEntity<TreeDataType>): boolean;
export declare function convertNodePropsToEventData(props: ITreeNodeProps & ReturnType<typeof getTreeNodeProps>): NTree.IEventDataNode;
export {};
