import { ExtractPropTypes, PropType, VNode } from 'vue';
declare enum TreeSearchMatchEnum {
    FULL = "full",
    FUZZY = "fuzzy"
}
declare enum TreeSearchResultEnum {
    LIST = "list",
    TREE = "tree"
}
export type TreeNode = {
    [key: string]: unknown;
    children?: TreeNode[];
};
/**
 * 拖拽放置类型
 * - 同父级节点，落在目标节点前/后：dropType = 'sort'
 * - 同父级节点，落在目标节点中间作为直接子节点：dropType = 'child'
 * - 非同父级等其他情况：dropType = 'move'
 * 非同父级等其他情况：dropType = 'move'
 */
export type DropType = 'child' | 'move' | 'sort';
/**
 * 拖拽添加为子节点后，目标节点的展开状态
 * - expand: 展开目标节点
 * - collapse: 收起目标节点
 * - inherit: 保持目标节点当前展开收起状态
 */
export type DragTargetOpenState = 'collapse' | 'expand' | 'inherit';
export type DisableDropHandler = (data: TreeNode, type: DropType, target: TreeNode) => boolean;
export type TreeDataChangeTrigger = 'async' | 'drag';
export type TreeDataChangePayload = {
    trigger: TreeDataChangeTrigger;
    data: TreeNode[];
    node: TreeNode;
    targetNode?: TreeNode;
    parentNode?: TreeNode | null;
    oldParentNode?: TreeNode | null;
    dropType?: DropType;
    sourceIndex?: number;
    targetIndex?: number;
};
export type TreeDataChangeHandler = (payload: TreeDataChangePayload) => void;
export type TreeCheckedPayload = {
    checkedNodes: TreeNode[];
    indeterminateNodes: TreeNode[];
};
export type TreeSelectedPayload = {
    selected: boolean;
    node: TreeNode;
};
export type TreeDropPayload = {
    event: unknown;
    element: HTMLElement;
    targetNode: TreeNode;
    sourceNode: TreeNode;
    data: TreeNode[];
    parentNode?: TreeNode | null;
    oldParentNode?: TreeNode | null;
    dropType?: DropType;
    sourceIndex?: number;
    targetIndex?: number;
};
export type TreeDragSortPayload = {
    sourceNode: TreeNode;
    targetNode: TreeNode;
    data: TreeNode[];
    parentNode?: TreeNode | null;
    oldParentNode?: TreeNode | null;
    dropType?: DropType;
    sourceIndex?: number;
    targetIndex?: number;
};
/**
 * Tree Prop: prefixIcon function
 * @param {} isRoot 是否为分跟节点
 * @param {} hasChild 是否有孩子节点
 * @param {} isOpen 当前节点是否展开
 * @param {} renderType 当前渲染类型（action: 用来标识当前节点状态，展开 | 收起, node_type：节点类型，文件、文件夹）
 * @param {} item 当前节点数据
 */
export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: TreeNode) => VNode | string;
export declare const treeProps: {
    /**
     * 渲染列表
     */
    data: import("vue-types").VueTypeDef<any[]> & {
        default: () => any[];
    };
    /**
     * 指定节点标签为节点对象的某个属性值
     */
    label: import("vue-types").VueTypeDef<any>;
    /**
     * 每个树节点用来作为唯一标识的属性，此标识应该是唯一的
     * 如果设置系统会默认自动生成唯一id
     */
    nodeKey: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
        default: string;
    } & {
        default: string;
    };
    /**
     * 子节点 Key, 用于读取子节点
     * 默认 children
     */
    children: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
        default: string;
    } & {
        default: string;
    };
    /**
     * 相邻级节点间的水平缩进，单位为像素
     */
    indent: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
        default: number;
    } & {
        default: number;
    };
    /**
     * 设置行高
     */
    lineHeight: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
        default: number;
    } & {
        default: number;
    };
    /**
     * 设置树形组件高度
     * 在设置 virtualRender=true时，请指定高度，避免组件自动计算高度导致多次渲染
     */
    height: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
        default: number;
    };
    /**
     * 设置层级连线
     */
    levelLine: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    /**
     * 是否开启虚拟滚动
     * 默认虚拟滚动是开启的，数据量大的情况下有利于性能优化，可以通过设置 virtualRender = false 关闭虚拟滚动
     */
    virtualRender: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 当前节点标识图标
     * 默认 true
     */
    prefixIcon: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    /**
     * 当树数据需要由外部接管更新时的统一回调
     */
    onDataChange: PropType<TreeDataChangeHandler>;
    /**
     * 异步加载节点数据配置
     * @param callback 请求数据回调函数，函数返回 Promise
     * @param cache 是否缓存请求结果，默认为True，只有在第一次才会发起请求，若设置为false则每次都会发起请求
     */
    async: import("vue-types").VueTypeShape<AsyncOption>;
    /**
     * 每个节点偏移左侧距离
     */
    offsetLeft: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
        default: number;
    } & {
        default: number;
    };
    /**
     * 搜索配置
     * 可以为一个配置项 SearchOption
     * 或者直接为一个字符串，如果直接为字符串则模糊匹配此值
     */
    search: import("vue-types").VueTypeDef<string | number | boolean | SearchOption> & {
        default: string | number | boolean | (() => SearchOption);
    };
    emptyText: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
        default: string;
    } & {
        default: string;
    };
    draggable: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    disableDrag: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
        default: (...args: any[]) => any;
    };
    /**
     * 是否禁用拖拽释放操作
     * @param data
     * @param type
     * @param target
     * @returns
     */
    disableDrop: PropType<DisableDropHandler>;
    /**
     * 拖拽阈值：节点顶部/底部区域占比用于判定前后插入，中间区域作为目标子节点
     */
    dragThreshold: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
        default: number;
    } & {
        default: number;
    };
    /**
     * 节点拖拽时可调整前后顺序；拖拽到节点中部仍会添加为目标子节点
     */
    dragSort: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 拖拽排序模式
     * - any: 允许拖拽到任意位置
     * - next: 只允许拖拽到同级节点的前后位置
     * 默认 any
     */
    dragSortMode: import("vue-types").VueTypeDef<string> & {
        default: string;
    };
    /**
     * 拖拽添加为子节点后，目标节点的展开状态
     * - expand: 展开目标节点
     * - collapse: 收起目标节点
     * - inherit: 保持目标节点当前展开收起状态
     */
    dragTargetOpenState: import("vue-types").VueTypeDef<string> & {
        default: string;
    };
    /**
     * 节点是否可以选中
     */
    selectable: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    disabledFolderSelectable: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 是否支持多选
     */
    showCheckbox: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    /**
     * 是否禁用节点复选框
     */
    disableCheck: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 默认选中的节点id，selectable为false时无效
     */
    checked: import("vue-types").VueTypeDef<any[]> & {
        default: () => any[];
    };
    /**
     * 是否显示节点类型Icon
     */
    showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 默认选中的节点id，selectable为false时无效
     */
    selected: import("vue-types").VueTypeDef<string | number | Record<string, any>>;
    /**
     * 是否自动检查当前节点是否有子节点
     * 节点前面的展开收起Icon会根据判定值做改变
     * 如果需要自已控制，请设置为false
     */
    autoCheckChildren: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    /**
     * 如果设置了某一个叶子节点状态为展开，是否自动展开所有父级节点
     * 默认为true，如果设置为false，则每层状态需要自己控制
     */
    autoOpenParentNode: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 默认是否展开所有节点
     */
    expandAll: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 节点内容点击行为
     * 此处配置每个节点除了展开\收起箭头之外的内容块时的行为
     * 默认为 ['selected', 'expand', 'click']，点击内容块为选中当前节点
     * 可选值：
     * - 'selected': 选中节点
     * - 'expand': 展开节点
     * - 'collapse': 收起节点
     * - 'click': 触发 nodeClick 事件
     * - 'checked': 切换复选框选中状态（需要 showCheckbox 为 true）
     */
    nodeContentAction: import("vue-types").VueTypeDef<any> & {
        default: any;
    };
    /**
     * 是否作用域插槽抛出参数是否保持源数据的引用
     * 如果设置为true，则作用域插槽参数格式为: { data: node, attributes: {} }
     * 如果设置为false，则作用域插槽参数格式为: { ...node, ...attributes }
     * attributes 为节点内置属性，包含节点是否展开，是否选中，是否有子节点等等
     */
    keepSlotData: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 在显示复选框的情况下，是否严格的遵循父子互相关联的做法
     */
    checkStrictly: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 是否开启父子勾选级联；未传时沿用 checkStrictly 历史语义
     */
    cascade: import("vue-types").VueTypeValidableDef<boolean, import("vue-types/dist/shared/vue-types.d8e57a80").b<boolean>> & {
        default: boolean;
    };
    /**
     * 是否开启监听Tree节点进入Tree容器可视区域
     */
    intersectionObserver: import("vue-types").VueTypeDef<boolean | IIntersectionObserver> & {
        default: boolean | (() => IIntersectionObserver);
    };
};
type AsyncLoadCallback = (item: TreeNode, cb: (data: TreeNode | TreeNode[]) => Promise<unknown> | unknown, data?: unknown) => Promise<TreeNode | TreeNode[]> | TreeNode | TreeNode[];
type AsyncOption = {
    callback: AsyncLoadCallback;
    cache: boolean;
    deepAutoOpen?: string;
    trigger?: string[];
};
export type IIntersectionObserver = {
    enabled: boolean;
    callback: (node: TreeNode, level: number, index: number) => void;
};
export type SearchOption = {
    value: boolean | number | string;
    match?: ((...args: any[]) => boolean) | `${TreeSearchMatchEnum}`;
    resultType?: `${TreeSearchResultEnum}`;
    showChildNodes?: boolean;
};
export type TreePropTypes = Readonly<ExtractPropTypes<typeof treeProps>>;
export {};
