import { InjectionKey, Ref } from 'vue';
import { AllowDragFunction, AllowDropFunction, FakeNode, NodeDropType, RootTreeType, TreeNodeData, TreeKey, TreeStoreNodesMap, LoadFunction, FilterNodeMethodFunction, TreeNodeClassName, FilterValue, TreeData, TreeNodeLoadedDefaultProps } from '../tree.type.js';
import { default as TreeStore } from './tree-store.js';
import { default as Node } from './node.js';
export interface TreeDragNode {
    node: Node;
    $el?: HTMLElement | null;
}
interface DragOptions {
    event: DragEvent;
    treeNode: TreeDragNode;
}
interface UseDragNodeOptions {
    props: {
        allowDrag?: AllowDragFunction;
        allowDrop?: AllowDropFunction;
    };
    emit: RootTreeType["emit"];
    rootRef: Ref<HTMLElement | null>;
    dropIndicatorRef: Ref<HTMLElement | null>;
    store: Ref<TreeStore>;
    blockClass: string;
}
export interface DragEvents {
    treeNodeDragStart: (options: DragOptions) => void;
    treeNodeDragOver: (options: DragOptions) => void;
    treeNodeDragEnd: (event: DragEvent) => void;
}
export declare const dragEventsKey: InjectionKey<DragEvents>;
export declare function useDragNodeHandler({ props, emit, rootRef, dropIndicatorRef, store, blockClass }: UseDragNodeOptions): {
    dragState: Ref<{
        allowDrop: boolean;
        dropType: NodeDropType | null;
        draggingNode: {
            node: {
                id: number;
                text: string | null;
                checked: boolean;
                indeterminate: boolean;
                data: TreeNodeData | TreeNodeData[];
                expanded: boolean;
                parent: /*elided*/ any | null;
                visible: boolean;
                isCurrent: boolean;
                store: {
                    currentNode: /*elided*/ any | null;
                    currentNodeKey: TreeKey | null;
                    nodesMap: TreeStoreNodesMap;
                    root: /*elided*/ any;
                    data: TreeNodeData[];
                    lazy: boolean;
                    load?: LoadFunction | undefined;
                    filterNodeMethod?: FilterNodeMethodFunction | undefined;
                    key?: string | undefined;
                    defaultCheckedKeys?: TreeKey[] | undefined;
                    checkStrictly: boolean;
                    checkDescendants: boolean;
                    defaultExpandedKeys?: TreeKey[] | undefined;
                    autoExpandParent: boolean;
                    defaultExpandAll: boolean;
                    accordion: boolean;
                    props: {
                        children?: string | undefined;
                        label?: string | ((data: TreeNodeData, node: Node) => string) | undefined;
                        disabled?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        class?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                        contentClass?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                    };
                    initialize: () => void;
                    filter: (value: FilterValue) => void;
                    setData: (newVal: TreeData) => void;
                    getNode: (data: TreeKey | TreeNodeData | Node) => Node | null;
                    insertBefore: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    insertAfter: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    remove: (data: TreeNodeData | Node) => void;
                    append: (data: TreeNodeData, parentData?: TreeNodeData | TreeKey | Node) => void;
                    _initDefaultCheckedNodes: () => void;
                    _initDefaultCheckedNode: (node: Node) => void;
                    setDefaultCheckedKey: (newVal: TreeKey[]) => void;
                    registerNode: (node: Node) => void;
                    deregisterNode: (node: Node) => void;
                    getCheckedNodes: (leafOnly?: boolean, includeHalfChecked?: boolean) => TreeNodeData[];
                    getCheckedKeys: (leafOnly?: boolean) => TreeKey[];
                    getHalfCheckedNodes: () => TreeNodeData[];
                    getHalfCheckedKeys: () => TreeKey[];
                    _getAllNodes: () => Node[];
                    updateChildren: (key: TreeKey, data: TreeData) => void;
                    _setCheckedKeys: (key: string, leafOnly: boolean | undefined, checkedKeys: Record< TreeKey, boolean>) => void;
                    setCheckedNodes: (array: TreeNodeData[], leafOnly?: boolean) => void;
                    setCheckedKeys: (keys: TreeKey[], leafOnly?: boolean) => void;
                    setDefaultExpandedKeys: (keys: TreeKey[]) => void;
                    setChecked: (data: TreeKey | TreeNodeData, checked: boolean, deep: boolean) => void;
                    getCurrentNode: () => Node | null;
                    setCurrentNode: (currentNode: Node | null) => void;
                    setUserCurrentNode: (node: Node, shouldAutoExpandParent?: boolean) => void;
                    setCurrentNodeKey: (key: TreeKey | null, shouldAutoExpandParent?: boolean) => void;
                };
                isLeafByUser: boolean | undefined;
                isLeaf: boolean | undefined;
                level: number;
                loaded: boolean;
                childNodes: /*elided*/ any[];
                loading: boolean;
                loadFailed: boolean;
                isEffectivelyChecked: boolean;
                initialize: () => void;
                setData: (data: TreeData | TreeNodeData) => void;
                readonly label: string;
                readonly key: TreeKey | null;
                readonly disabled: boolean;
                readonly nextSibling: /*elided*/ any | null;
                readonly previousSibling: /*elided*/ any | null;
                contains: (target: Node, deep?: boolean) => boolean;
                remove: () => void;
                insertChild: (child?: FakeNode | Node, index?: number, batch?: boolean) => void;
                insertBefore: (child: FakeNode | Node, ref: Node) => void;
                insertAfter: (child: FakeNode | Node, ref: Node) => void;
                removeChild: (child: Node) => void;
                removeChildByData: (data: TreeNodeData | null) => void;
                expand: (callback?: (() => void) | null, expandParent?: boolean) => void;
                doCreateChildren: (array: TreeData, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                collapse: () => void;
                shouldLoadData: () => boolean;
                updateLeafState: () => void;
                setChecked: (value?: boolean | "half", deep?: boolean, recursion?: boolean, passValue?: boolean) => void;
                getChildren: (forceInit?: boolean) => TreeData | null;
                updateChildren: () => void;
                loadData: (callback?: (data?: TreeData) => void, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                eachNode: (callback: (node: Node) => void) => void;
                reInitChecked: () => void;
            };
            $el?: (HTMLElement | null) | undefined;
        } | null;
        showDropIndicator: boolean;
        dropNode: {
            node: {
                id: number;
                text: string | null;
                checked: boolean;
                indeterminate: boolean;
                data: TreeNodeData | TreeNodeData[];
                expanded: boolean;
                parent: /*elided*/ any | null;
                visible: boolean;
                isCurrent: boolean;
                store: {
                    currentNode: /*elided*/ any | null;
                    currentNodeKey: TreeKey | null;
                    nodesMap: TreeStoreNodesMap;
                    root: /*elided*/ any;
                    data: TreeNodeData[];
                    lazy: boolean;
                    load?: LoadFunction | undefined;
                    filterNodeMethod?: FilterNodeMethodFunction | undefined;
                    key?: string | undefined;
                    defaultCheckedKeys?: TreeKey[] | undefined;
                    checkStrictly: boolean;
                    checkDescendants: boolean;
                    defaultExpandedKeys?: TreeKey[] | undefined;
                    autoExpandParent: boolean;
                    defaultExpandAll: boolean;
                    accordion: boolean;
                    props: {
                        children?: string | undefined;
                        label?: string | ((data: TreeNodeData, node: Node) => string) | undefined;
                        disabled?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        class?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                        contentClass?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                    };
                    initialize: () => void;
                    filter: (value: FilterValue) => void;
                    setData: (newVal: TreeData) => void;
                    getNode: (data: TreeKey | TreeNodeData | Node) => Node | null;
                    insertBefore: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    insertAfter: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    remove: (data: TreeNodeData | Node) => void;
                    append: (data: TreeNodeData, parentData?: TreeNodeData | TreeKey | Node) => void;
                    _initDefaultCheckedNodes: () => void;
                    _initDefaultCheckedNode: (node: Node) => void;
                    setDefaultCheckedKey: (newVal: TreeKey[]) => void;
                    registerNode: (node: Node) => void;
                    deregisterNode: (node: Node) => void;
                    getCheckedNodes: (leafOnly?: boolean, includeHalfChecked?: boolean) => TreeNodeData[];
                    getCheckedKeys: (leafOnly?: boolean) => TreeKey[];
                    getHalfCheckedNodes: () => TreeNodeData[];
                    getHalfCheckedKeys: () => TreeKey[];
                    _getAllNodes: () => Node[];
                    updateChildren: (key: TreeKey, data: TreeData) => void;
                    _setCheckedKeys: (key: string, leafOnly: boolean | undefined, checkedKeys: Record< TreeKey, boolean>) => void;
                    setCheckedNodes: (array: TreeNodeData[], leafOnly?: boolean) => void;
                    setCheckedKeys: (keys: TreeKey[], leafOnly?: boolean) => void;
                    setDefaultExpandedKeys: (keys: TreeKey[]) => void;
                    setChecked: (data: TreeKey | TreeNodeData, checked: boolean, deep: boolean) => void;
                    getCurrentNode: () => Node | null;
                    setCurrentNode: (currentNode: Node | null) => void;
                    setUserCurrentNode: (node: Node, shouldAutoExpandParent?: boolean) => void;
                    setCurrentNodeKey: (key: TreeKey | null, shouldAutoExpandParent?: boolean) => void;
                };
                isLeafByUser: boolean | undefined;
                isLeaf: boolean | undefined;
                level: number;
                loaded: boolean;
                childNodes: /*elided*/ any[];
                loading: boolean;
                loadFailed: boolean;
                isEffectivelyChecked: boolean;
                initialize: () => void;
                setData: (data: TreeData | TreeNodeData) => void;
                readonly label: string;
                readonly key: TreeKey | null;
                readonly disabled: boolean;
                readonly nextSibling: /*elided*/ any | null;
                readonly previousSibling: /*elided*/ any | null;
                contains: (target: Node, deep?: boolean) => boolean;
                remove: () => void;
                insertChild: (child?: FakeNode | Node, index?: number, batch?: boolean) => void;
                insertBefore: (child: FakeNode | Node, ref: Node) => void;
                insertAfter: (child: FakeNode | Node, ref: Node) => void;
                removeChild: (child: Node) => void;
                removeChildByData: (data: TreeNodeData | null) => void;
                expand: (callback?: (() => void) | null, expandParent?: boolean) => void;
                doCreateChildren: (array: TreeData, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                collapse: () => void;
                shouldLoadData: () => boolean;
                updateLeafState: () => void;
                setChecked: (value?: boolean | "half", deep?: boolean, recursion?: boolean, passValue?: boolean) => void;
                getChildren: (forceInit?: boolean) => TreeData | null;
                updateChildren: () => void;
                loadData: (callback?: (data?: TreeData) => void, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                eachNode: (callback: (node: Node) => void) => void;
                reInitChecked: () => void;
            };
            $el?: (HTMLElement | null) | undefined;
        } | null;
    }, {
        allowDrop: boolean;
        dropType: NodeDropType | null;
        draggingNode: TreeDragNode | null;
        showDropIndicator: boolean;
        dropNode: TreeDragNode | null;
    } | {
        allowDrop: boolean;
        dropType: NodeDropType | null;
        draggingNode: {
            node: {
                id: number;
                text: string | null;
                checked: boolean;
                indeterminate: boolean;
                data: TreeNodeData | TreeNodeData[];
                expanded: boolean;
                parent: /*elided*/ any | null;
                visible: boolean;
                isCurrent: boolean;
                store: {
                    currentNode: /*elided*/ any | null;
                    currentNodeKey: TreeKey | null;
                    nodesMap: TreeStoreNodesMap;
                    root: /*elided*/ any;
                    data: TreeNodeData[];
                    lazy: boolean;
                    load?: LoadFunction | undefined;
                    filterNodeMethod?: FilterNodeMethodFunction | undefined;
                    key?: string | undefined;
                    defaultCheckedKeys?: TreeKey[] | undefined;
                    checkStrictly: boolean;
                    checkDescendants: boolean;
                    defaultExpandedKeys?: TreeKey[] | undefined;
                    autoExpandParent: boolean;
                    defaultExpandAll: boolean;
                    accordion: boolean;
                    props: {
                        children?: string | undefined;
                        label?: string | ((data: TreeNodeData, node: Node) => string) | undefined;
                        disabled?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        class?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                        contentClass?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                    };
                    initialize: () => void;
                    filter: (value: FilterValue) => void;
                    setData: (newVal: TreeData) => void;
                    getNode: (data: TreeKey | TreeNodeData | Node) => Node | null;
                    insertBefore: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    insertAfter: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    remove: (data: TreeNodeData | Node) => void;
                    append: (data: TreeNodeData, parentData?: TreeNodeData | TreeKey | Node) => void;
                    _initDefaultCheckedNodes: () => void;
                    _initDefaultCheckedNode: (node: Node) => void;
                    setDefaultCheckedKey: (newVal: TreeKey[]) => void;
                    registerNode: (node: Node) => void;
                    deregisterNode: (node: Node) => void;
                    getCheckedNodes: (leafOnly?: boolean, includeHalfChecked?: boolean) => TreeNodeData[];
                    getCheckedKeys: (leafOnly?: boolean) => TreeKey[];
                    getHalfCheckedNodes: () => TreeNodeData[];
                    getHalfCheckedKeys: () => TreeKey[];
                    _getAllNodes: () => Node[];
                    updateChildren: (key: TreeKey, data: TreeData) => void;
                    _setCheckedKeys: (key: string, leafOnly: boolean | undefined, checkedKeys: Record< TreeKey, boolean>) => void;
                    setCheckedNodes: (array: TreeNodeData[], leafOnly?: boolean) => void;
                    setCheckedKeys: (keys: TreeKey[], leafOnly?: boolean) => void;
                    setDefaultExpandedKeys: (keys: TreeKey[]) => void;
                    setChecked: (data: TreeKey | TreeNodeData, checked: boolean, deep: boolean) => void;
                    getCurrentNode: () => Node | null;
                    setCurrentNode: (currentNode: Node | null) => void;
                    setUserCurrentNode: (node: Node, shouldAutoExpandParent?: boolean) => void;
                    setCurrentNodeKey: (key: TreeKey | null, shouldAutoExpandParent?: boolean) => void;
                };
                isLeafByUser: boolean | undefined;
                isLeaf: boolean | undefined;
                level: number;
                loaded: boolean;
                childNodes: /*elided*/ any[];
                loading: boolean;
                loadFailed: boolean;
                isEffectivelyChecked: boolean;
                initialize: () => void;
                setData: (data: TreeData | TreeNodeData) => void;
                readonly label: string;
                readonly key: TreeKey | null;
                readonly disabled: boolean;
                readonly nextSibling: /*elided*/ any | null;
                readonly previousSibling: /*elided*/ any | null;
                contains: (target: Node, deep?: boolean) => boolean;
                remove: () => void;
                insertChild: (child?: FakeNode | Node, index?: number, batch?: boolean) => void;
                insertBefore: (child: FakeNode | Node, ref: Node) => void;
                insertAfter: (child: FakeNode | Node, ref: Node) => void;
                removeChild: (child: Node) => void;
                removeChildByData: (data: TreeNodeData | null) => void;
                expand: (callback?: (() => void) | null, expandParent?: boolean) => void;
                doCreateChildren: (array: TreeData, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                collapse: () => void;
                shouldLoadData: () => boolean;
                updateLeafState: () => void;
                setChecked: (value?: boolean | "half", deep?: boolean, recursion?: boolean, passValue?: boolean) => void;
                getChildren: (forceInit?: boolean) => TreeData | null;
                updateChildren: () => void;
                loadData: (callback?: (data?: TreeData) => void, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                eachNode: (callback: (node: Node) => void) => void;
                reInitChecked: () => void;
            };
            $el?: (HTMLElement | null) | undefined;
        } | null;
        showDropIndicator: boolean;
        dropNode: {
            node: {
                id: number;
                text: string | null;
                checked: boolean;
                indeterminate: boolean;
                data: TreeNodeData | TreeNodeData[];
                expanded: boolean;
                parent: /*elided*/ any | null;
                visible: boolean;
                isCurrent: boolean;
                store: {
                    currentNode: /*elided*/ any | null;
                    currentNodeKey: TreeKey | null;
                    nodesMap: TreeStoreNodesMap;
                    root: /*elided*/ any;
                    data: TreeNodeData[];
                    lazy: boolean;
                    load?: LoadFunction | undefined;
                    filterNodeMethod?: FilterNodeMethodFunction | undefined;
                    key?: string | undefined;
                    defaultCheckedKeys?: TreeKey[] | undefined;
                    checkStrictly: boolean;
                    checkDescendants: boolean;
                    defaultExpandedKeys?: TreeKey[] | undefined;
                    autoExpandParent: boolean;
                    defaultExpandAll: boolean;
                    accordion: boolean;
                    props: {
                        children?: string | undefined;
                        label?: string | ((data: TreeNodeData, node: Node) => string) | undefined;
                        disabled?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
                        class?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                        contentClass?: ( TreeNodeClassName | ((data: TreeNodeData, node: Node) => TreeNodeClassName)) | undefined;
                    };
                    initialize: () => void;
                    filter: (value: FilterValue) => void;
                    setData: (newVal: TreeData) => void;
                    getNode: (data: TreeKey | TreeNodeData | Node) => Node | null;
                    insertBefore: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    insertAfter: (data: TreeNodeData, refData: TreeKey | TreeNodeData | Node) => void;
                    remove: (data: TreeNodeData | Node) => void;
                    append: (data: TreeNodeData, parentData?: TreeNodeData | TreeKey | Node) => void;
                    _initDefaultCheckedNodes: () => void;
                    _initDefaultCheckedNode: (node: Node) => void;
                    setDefaultCheckedKey: (newVal: TreeKey[]) => void;
                    registerNode: (node: Node) => void;
                    deregisterNode: (node: Node) => void;
                    getCheckedNodes: (leafOnly?: boolean, includeHalfChecked?: boolean) => TreeNodeData[];
                    getCheckedKeys: (leafOnly?: boolean) => TreeKey[];
                    getHalfCheckedNodes: () => TreeNodeData[];
                    getHalfCheckedKeys: () => TreeKey[];
                    _getAllNodes: () => Node[];
                    updateChildren: (key: TreeKey, data: TreeData) => void;
                    _setCheckedKeys: (key: string, leafOnly: boolean | undefined, checkedKeys: Record< TreeKey, boolean>) => void;
                    setCheckedNodes: (array: TreeNodeData[], leafOnly?: boolean) => void;
                    setCheckedKeys: (keys: TreeKey[], leafOnly?: boolean) => void;
                    setDefaultExpandedKeys: (keys: TreeKey[]) => void;
                    setChecked: (data: TreeKey | TreeNodeData, checked: boolean, deep: boolean) => void;
                    getCurrentNode: () => Node | null;
                    setCurrentNode: (currentNode: Node | null) => void;
                    setUserCurrentNode: (node: Node, shouldAutoExpandParent?: boolean) => void;
                    setCurrentNodeKey: (key: TreeKey | null, shouldAutoExpandParent?: boolean) => void;
                };
                isLeafByUser: boolean | undefined;
                isLeaf: boolean | undefined;
                level: number;
                loaded: boolean;
                childNodes: /*elided*/ any[];
                loading: boolean;
                loadFailed: boolean;
                isEffectivelyChecked: boolean;
                initialize: () => void;
                setData: (data: TreeData | TreeNodeData) => void;
                readonly label: string;
                readonly key: TreeKey | null;
                readonly disabled: boolean;
                readonly nextSibling: /*elided*/ any | null;
                readonly previousSibling: /*elided*/ any | null;
                contains: (target: Node, deep?: boolean) => boolean;
                remove: () => void;
                insertChild: (child?: FakeNode | Node, index?: number, batch?: boolean) => void;
                insertBefore: (child: FakeNode | Node, ref: Node) => void;
                insertAfter: (child: FakeNode | Node, ref: Node) => void;
                removeChild: (child: Node) => void;
                removeChildByData: (data: TreeNodeData | null) => void;
                expand: (callback?: (() => void) | null, expandParent?: boolean) => void;
                doCreateChildren: (array: TreeData, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                collapse: () => void;
                shouldLoadData: () => boolean;
                updateLeafState: () => void;
                setChecked: (value?: boolean | "half", deep?: boolean, recursion?: boolean, passValue?: boolean) => void;
                getChildren: (forceInit?: boolean) => TreeData | null;
                updateChildren: () => void;
                loadData: (callback?: (data?: TreeData) => void, defaultProps?: TreeNodeLoadedDefaultProps) => void;
                eachNode: (callback: (node: Node) => void) => void;
                reInitChecked: () => void;
            };
            $el?: (HTMLElement | null) | undefined;
        } | null;
    }>;
};
export {};
