import { ITreeProps } from './composable';
import { CSSProperties, VNode } from 'vue';
import { TCdsIconsName } from '@central-design-system/icons';
export declare namespace NTree {
    type TKey = string | number;
    type TNodeElement = VNode<ITreeProps>;
    type TGetCheckDisabled<RecordType> = (record: RecordType) => boolean;
    type TExpandAction = false | 'click' | 'doubleclick' | 'dblclick';
    type TDraggableFn = (node: IDataNode) => boolean;
    type TAllowDrop<TreeDataType extends IBasicDataNode = IDataNode> = (options: IAllowDropOptions<TreeDataType>) => boolean;
    type TEventHandler = (...args: any[]) => void;
    type TDragNodeEvent = {
        key: TKey;
        eventData: IEventDataNode;
        eventKey: TKey;
        selectHandle: HTMLSpanElement;
        pos: string;
    };
    type TNodeMouseEventHandler = (event: MouseEvent, node: IEventDataNode) => void;
    type TNodeMouseEventParams = {
        event: MouseEvent;
        node: IEventDataNode;
    };
    type TNodeDragEventParams = {
        event: DragEvent;
        node: IEventDataNode;
    };
    type TNodeDragEventHandler = (event: DragEvent, node: TDragNodeEvent | null, outsideTree?: boolean) => void;
    type TIconType = any;
    type DraggableFn = (node: IDataNode) => boolean;
    type TDraggableConfig = {
        icon?: TCdsIconsName | boolean;
        nodeDraggable?: DraggableFn;
    };
    interface IBasicDataNode {
        checkable?: boolean;
        selectable?: boolean;
        disabled?: boolean;
        disableCheckbox?: boolean;
        icon?: any;
        isLeaf?: boolean;
        switcherIcon?: TIconType;
        /** Set style of TreeNode. This is not recommend if you don't have any force requirement */
        class?: string;
        style?: CSSProperties;
        slots?: Record<string, string>;
        [key: string]: any;
    }
    interface IDataNode extends IBasicDataNode {
        children?: IDataNode[];
        key?: string | number;
        title?: any;
    }
    interface IEntity {
        node: TNodeElement;
        index?: number;
        key: TKey;
        pos: string;
        parent?: IEntity;
        children?: IEntity[];
    }
    interface IEventDataNode extends IDataNode {
        expanded?: boolean;
        selected?: boolean;
        checked: boolean;
        loaded?: boolean;
        loading?: boolean;
        halfChecked?: boolean;
        dragOver?: boolean;
        dragOverGapTop?: boolean;
        dragOverGapBottom?: boolean;
        pos?: string;
        active?: boolean;
        dataRef?: IDataNode;
        parent?: IDataNode;
        eventKey?: TKey;
    }
    interface IDataEntity<TreeDataType extends IBasicDataNode = IDataNode> extends Omit<IEntity, 'node' | 'parent' | 'children'> {
        node: TreeDataType;
        nodes: TreeDataType[];
        parent?: IDataEntity<TreeDataType>;
        children?: IDataEntity<TreeDataType>[];
        level?: number;
    }
    interface IFieldNames {
        title?: string;
        /** @private Internal usage, safe to remove if no need */
        _title?: string[];
        key?: string;
        children?: string;
    }
    interface IAllowDropOptions<TreeDataType extends IBasicDataNode = IDataNode> {
        dragNode: IEventDataNode;
        dropNode: TreeDataType;
        dropPosition: -1 | 0 | 1;
    }
    interface ICheckInfo {
        event: 'check';
        node: IEventDataNode;
        checked: boolean;
        nativeEvent: MouseEvent;
        checkedNodes: IDataNode[];
        checkedNodesPositions?: {
            node: IDataNode;
            pos: string;
        }[];
        halfCheckedKeys?: TKey[];
    }
    interface IFlattenNode {
        parent: IFlattenNode | null;
        children: IFlattenNode[] | null;
        pos: string;
        data: IDataNode;
        title: any;
        key: TKey;
        isStart: boolean[];
        isEnd: boolean[];
    }
    interface ITreeNodeRequiredProps<TreeDataType extends IBasicDataNode = IDataNode> {
        expandedKeysSet: Set<TKey>;
        selectedKeysSet: Set<TKey>;
        loadedKeysSet: Set<TKey>;
        loadingKeysSet: Set<TKey>;
        checkedKeysSet: Set<TKey>;
        halfCheckedKeysSet: Set<TKey>;
        dragOverNodeKey: TKey | null;
        dropPosition: number | null;
        keyEntities: Record<TKey, IDataEntity<TreeDataType>>;
    }
    interface IDragState {
        draggingNodeKey: TKey | null;
        dragChildrenKeys: TKey[];
        dropTargetKey: TKey | null;
        dropPosition: IAllowDropOptions['dropPosition'] | null;
        dropContainerKey: TKey | null;
        dropLevelOffset: number | null;
        dropTargetPos: string | null;
        dropAllowed: boolean;
        dragOverNodeKey: TKey | null;
    }
    interface ITreeNodeAttribute {
        eventKey: string;
        prefixCls: string;
        class: string;
        expanded: boolean;
        selected: boolean;
        checked: boolean;
        halfChecked: boolean;
        children: any;
        title: any;
        pos: string;
        dragOver: boolean;
        dragOverGapTop: boolean;
        dragOverGapBottom: boolean;
        isLeaf: boolean;
        selectable: boolean;
        disabled: boolean;
        disableCheckbox: boolean;
    }
}
