import { TreeNodeInfo } from "@blueprintjs/core";
import React from "react";
import { IDirectoryProps } from "./CommonPanel";
import './DirTreeComponent.less';
export interface DirIds {
    dir_id: string;
    pre_dir_id: string;
    next_dir_id: string;
    parent_dir_id: string;
}
interface DirTreeEvent {
    onClickTree?: () => void;
    onNodeClick?: (isReLoad?: boolean, isSecondaryLabel?: boolean) => void;
    onNodeContainerClick?: () => void;
    onMoveToDir?: (targetId: string) => void;
}
interface DirTreeCall {
    handleAddDir?: (currentNodesChildNodes: TreeNodeInfo[], isAddDirectory: boolean) => Promise<boolean> | boolean;
    handleRenameDir?: (curNodeData: TreeNodeInfo, isAddDirectory: boolean) => Promise<boolean> | boolean;
    handleDeleteDir?: (currentDir: IDirectoryProps) => Promise<boolean> | boolean;
    handleMoveDir?: (dirIds: DirIds) => Promise<boolean> | boolean;
}
interface DirTreeState {
    currentDir: IDirectoryProps;
    prevCurrentDirId: string;
    isContextMenuOpen: boolean;
    nodes: TreeNodeInfo[];
    defaultDirName: string;
    updateNode: TreeNodeInfo;
}
interface DirTreeProps extends DirTreeEvent, DirTreeCall {
    renderMenuItems?: () => JSX.Element;
    defaultDirId?: string;
    nodes: TreeNodeInfo[];
    maxDirLength?: number;
    isPreventDrag?: boolean;
    currentDir?: IDirectoryProps;
    canDrag?: boolean;
}
export declare class DirTreeComponent extends React.Component<DirTreeProps, DirTreeState> {
    static defaultProps: Partial<DirTreeProps>;
    private _moveDirId;
    private _moveElement;
    private _targetElement;
    private _postion;
    private expandTimeId;
    private nodeEls;
    private defultCurrentDir;
    private treeEl;
    private touchEventEditor;
    constructor(prop: any);
    private getEffectiveDirNodeEl;
    private getTargetIdByEl;
    private getNodeById;
    private getPathInfoById;
    private getNodeInfoByPathNum;
    private forEachNode;
    private SelectNode;
    private handleNodeCollapse;
    private updateNodeEls;
    private autoExpand;
    upDateCurrentDir: (newDir: IDirectoryProps) => void;
    private handleNodeClick;
    private handleAddDir;
    private handleRenameDir;
    handleDeleteDir: () => Promise<void>;
    private getCurrentDir;
    private handleTreeMouseDown;
    private handleDirDragStart;
    private handleDragEnter;
    private handleDirDragOver;
    private handleDirDragLeave;
    private handleMoveFiles;
    private moveDir;
    private moveDirNode;
    private handleDirDragEnd;
    UpdataDirTreeByNodes: (nodes: TreeNodeInfo<{}>[]) => void;
    private showContextMenu;
    componentDidMount(): void;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps: Readonly<DirTreeProps>, prevState: Readonly<DirTreeState>, snapshot?: any): void;
    static getDerivedStateFromProps(nextProps: Readonly<DirTreeProps>, prevState: Readonly<DirTreeState>): {
        currentDir: IDirectoryProps;
        prevCurrentDirId: string;
    };
    render(): React.ReactNode;
}
export {};
//# sourceMappingURL=DirTreeComponent.d.ts.map