import { Component, Key } from 'react';
import { C7nTreeNodeProps, EventDataNode, DataNode, TreeNode, TreeProps as C7NTreeProps } from '../../../lib/tree';
import { CheckInfo } from '../../../lib/rc-components/tree/Tree';
import DataSet from '../data-set/DataSet';
import Record from '../data-set/Record';
import { NodeRenderer, TreeNodeRenderer } from './util';
export interface C7nNodeEvent extends EventDataNode {
    eventKey: string;
}
export interface TreeNodeCheckedEvent {
    event: 'check';
    node: C7nNodeEvent;
    checked: boolean;
    nativeEvent: MouseEvent;
    checkedNodes: DataNode[];
    checkedNodesPositions?: {
        node: DataNode;
        pos: string;
    }[];
    halfCheckedKeys?: string[];
}
export interface C7nTreeNodeSelectedEvent {
    event: 'select';
    selected: boolean;
    node: C7nNodeEvent;
    selectedNodes: DataNode[];
    nativeEvent: MouseEvent;
}
export interface C7nTreeNodeExpandedEvent {
    expanded: boolean;
    nativeEvent: MouseEvent;
    node: C7nNodeEvent;
}
export interface TreeProps extends C7NTreeProps {
    dataSet?: DataSet;
    renderer?: NodeRenderer;
    titleField?: string;
    onTreeNode?: TreeNodeRenderer;
    /**
     * @deprecated
     */
    treeNodeRenderer?: TreeNodeRenderer;
    async?: boolean;
    filter?: (record: Record, index: number, array: Record[]) => boolean;
}
declare type CheckedKeys = string[] | {
    checked: string[];
    halfChecked: string[];
};
export declare function defaultRenderer({ text }: {
    text: any;
}): any;
export default class Tree extends Component<TreeProps> {
    static displayName: string;
    static TreeNode: typeof TreeNode;
    stateCheckedKeys: string[];
    stateExpandedKeys: string[];
    stateLoadedKeys: string[];
    inCheckExpansion: boolean;
    componentWillMount(): void;
    componentWillReceiveProps(nextProps: any): void;
    componentWillUnmount(): void;
    processDataSetListener(flag: boolean): void;
    handleDataSetLoad(): void;
    initDefaultExpandedRows(): void;
    initDefaultCheckRows(): void;
    initDefaultLoadedRows(): void;
    initDefaultSelectRows(): void;
    /**
     * 处理tree的props expand check的默认事件
     * @param dataSet
     * @param defaultAll
     * @param defaultKeys
     */
    dealDefaultCheckExpand(dataSet: DataSet | undefined, defaultKeys: Key[] | undefined, defaultAll?: boolean): string[];
    get expandedKeys(): string[];
    get checkedKeys(): string[];
    get selectedKeys(): string[];
    get checkStrictly(): boolean | undefined;
    constructor(props: any, context: any);
    setExpand(eventObj: C7nTreeNodeExpandedEvent): boolean;
    setCheck(eventObj: C7nTreeNodeProps): boolean;
    handleExpand(expandedKeys: string[], eventObj: C7nTreeNodeExpandedEvent): void;
    handleCheck(checkedKeys: CheckedKeys, eventObj: CheckInfo, oldCheckedKeys: CheckedKeys): void;
    handleBatchSelect({ dataSet, records }: {
        dataSet: any;
        records: any;
    }): void;
    handleUnBatchSelect({ dataSet, records }: {
        dataSet: any;
        records: any;
    }): void;
    handleDataSetSelect({ dataSet, records }: {
        dataSet: any;
        records: any;
    }, checked: any): void;
    handleSelect(selectedKeys: string[], eventObj: C7nTreeNodeSelectedEvent): void;
    handleLoadData(event: any): Promise<any>;
    handleAfterLoadData(event: any): void;
    render(): JSX.Element;
}
export {};
