import * as React from 'react';
import DirectoryTree from './DirectoryTree';
export interface DtdTreeNodeAttribute {
    eventKey: string;
    prefixCls: string;
    className: string;
    expanded: boolean;
    selected: boolean;
    checked: boolean;
    halfChecked: boolean;
    children: React.ReactNode;
    title: React.ReactNode;
    pos: string;
    dragOver: boolean;
    dragOverGapTop: boolean;
    dragOverGapBottom: boolean;
    isLeaf: boolean;
    selectable: boolean;
    disabled: boolean;
    disableCheckbox: boolean;
}
export interface DtTreeNodeProps {
    className?: string;
    disabled?: boolean;
    disableCheckbox?: boolean;
    title?: string | React.ReactNode;
    key?: string;
    eventKey?: string;
    isLeaf?: boolean;
    checked?: boolean;
    expanded?: boolean;
    selected?: boolean;
    selectable?: boolean;
    icon?: ((treeNode: DtdTreeNodeAttribute) => React.ReactNode) | React.ReactNode;
    children?: React.ReactNode;
    [customProp: string]: any;
}
export interface DtTreeNode extends React.Component<DtTreeNodeProps, {}> {
}
export interface DtTreeNodeBaseEvent {
    node: DtTreeNode;
    nativeEvent: MouseEvent;
}
export interface DtTreeNodeCheckedEvent extends DtTreeNodeBaseEvent {
    event: 'check';
    checked?: boolean;
    checkedNodes?: DtTreeNode[];
}
export interface DtTreeNodeSelectedEvent extends DtTreeNodeBaseEvent {
    event: 'select';
    selected?: boolean;
    selectedNodes?: DtTreeNode[];
}
export interface DtTreeNodeExpandedEvent extends DtTreeNodeBaseEvent {
    expanded?: boolean;
}
export interface DtTreeNodeMouseEvent {
    node: DtTreeNode;
    event: React.MouseEventHandler<any>;
}
export interface TreeProps {
    showLine?: boolean;
    className?: string;
    /** 是否支持多选 */
    multiple?: boolean;
    /** 是否自动展开父节点 */
    autoExpandParent?: boolean;
    /** checkable状态下节点选择完全受控（父子节点选中状态不再关联）*/
    checkStrictly?: boolean;
    /** 是否支持选中 */
    checkable?: boolean;
    /** 是否禁用树 */
    disabled?: boolean;
    /** 默认展开所有树节点 */
    defaultExpandAll?: boolean;
    /** 默认展开对应树节点 */
    defaultExpandParent?: boolean;
    /** 默认展开指定的树节点 */
    defaultExpandedKeys?: string[];
    /** （受控）展开指定的树节点 */
    expandedKeys?: string[];
    /** （受控）选中复选框的树节点 */
    checkedKeys?: string[] | {
        checked: string[];
        halfChecked: string[];
    };
    /** 默认选中复选框的树节点 */
    defaultCheckedKeys?: string[];
    /** （受控）设置选中的树节点 */
    selectedKeys?: string[];
    /** 默认选中的树节点 */
    defaultSelectedKeys?: string[];
    selectable?: boolean;
    /** 展开/收起节点时触发 */
    onExpand?: (expandedKeys: string[], info: DtTreeNodeExpandedEvent) => void | PromiseLike<any>;
    /** 点击复选框触发 */
    onCheck?: (checkedKeys: string[] | {
        checked: string[];
        halfChecked: string[];
    }, e: DtTreeNodeCheckedEvent) => void;
    /** 点击树节点触发 */
    onSelect?: (selectedKeys: string[], e: DtTreeNodeSelectedEvent) => void;
    /** 单击树节点触发 */
    onClick?: (e: React.MouseEvent<HTMLElement>, node: DtTreeNode) => void;
    /** 双击树节点触发 */
    onDoubleClick?: (e: React.MouseEvent<HTMLElement>, node: DtTreeNode) => void;
    /** filter some DtTreeNodes as you need. it should return true */
    filterDtTreeNode?: (node: DtTreeNode) => boolean;
    /** 异步加载数据 */
    loadData?: (node: DtTreeNode) => PromiseLike<any>;
    loadedKeys?: string[];
    onLoaded?: (loadedKeys: string[], info: {
        event: 'load';
        node: DtTreeNode;
    }) => void;
    /** 响应右键点击 */
    onRightClick?: (options: DtTreeNodeMouseEvent) => void;
    /** 设置节点可拖拽（IE>8）*/
    draggable?: boolean;
    /** 开始拖拽时调用 */
    onDragStart?: (options: DtTreeNodeMouseEvent) => void;
    /** dragenter 触发时调用 */
    onDragEnter?: (options: DtTreeNodeMouseEvent) => void;
    /** dragover 触发时调用 */
    onDragOver?: (options: DtTreeNodeMouseEvent) => void;
    /** dragleave 触发时调用 */
    onDragLeave?: (options: DtTreeNodeMouseEvent) => void;
    /** drop 触发时调用 */
    onDrop?: (options: DtTreeNodeMouseEvent) => void;
    style?: React.CSSProperties;
    showIcon?: boolean;
    icon?: (nodeProps: DtdTreeNodeAttribute) => React.ReactNode | React.ReactNode;
    prefixCls?: string;
    filterTreeNode?: (node: DtTreeNode) => boolean;
    children?: React.ReactNode | React.ReactNode[];
}
export default class Tree extends React.Component<TreeProps, any> {
    static TreeNode: React.ComponentClass<DtTreeNodeProps>;
    static DirectoryTree: typeof DirectoryTree;
    static defaultProps: {
        prefixCls: string;
        checkable: boolean;
        showIcon: boolean;
        openAnimation: {
            appear: null;
            enter(node: HTMLElement, done: () => void): any;
            leave(node: HTMLElement, done: () => void): any;
        };
    };
    render(): JSX.Element;
}
