import { RouterConfig, Request } from '../interface';
import { IconType as _IconType } from '../tree-node-icon';
import { EventDataNode, DataNode, TreeProps as AntDTreeProps } from 'antd/lib/tree';
export declare type IconType = _IconType;
export declare type TreeNodeKey = string;
export declare type NodeAttrs = {
    id?: string;
    params?: any;
    type?: string;
    orgName?: string;
    position?: string;
    deptNames?: string[];
    children?: ExtendedNode[];
};
export declare type ExtendedNode = DataNode & NodeAttrs;
export declare type ExtendedEventNode = EventDataNode & NodeAttrs;
export declare type SelectedDataNode = {
    event: 'select';
    selected: boolean;
    node: ExtendedEventNode;
    selectedNodes: DataNode[];
    nativeEvent: MouseEvent;
};
export declare type TreeDataSource = ExtendedNode[];
export declare type SelfNameMap = {
    org?: string;
    dept?: string;
    group?: string;
    tag?: string;
    permission?: string;
    user?: string;
};
export interface IComposeTreeContext {
    activeKey: TreeNodeKey;
    treePaths: TreeNodeKey[];
    activeParams: any;
    dataSource: TreeDataSource;
    expandedKeys: AntDTreeProps['expandedKeys'];
    goToModule: (targetNode: Pick<ExtendedEventNode, 'key' | 'type' | 'params'>, nodePath: string, isReplace?: boolean) => void;
    loadData: (node: Partial<ExtendedEventNode>) => Promise<void>;
    getRoutePath: (modulePath: string) => {
        purePath: string;
        path: string;
    };
    setExpandedKeys: (expandedKeys: AntDTreeProps['expandedKeys']) => void;
    loadDataByTreePath: (idList?: string[]) => Promise<void>;
    reloadTree: () => Promise<void>;
    generateUrlByTreePaths: (nextTreePaths: string[], nextPath?: string) => string;
    isSearch: boolean;
    setIsSearch: any;
}
export declare type UserType = 'customer' | 'employee';
export interface TreeProps extends Omit<AntDTreeProps, 'onSelect'> {
    request: {
        /**
         * 搜索树节点
         * 参数:
         * { keywords: string }
         * 返回：
         * {
         *   dataSource: Array<{
         *     label: string;
         *     key: string;
         *     labelPath: Array<{ label: string; key: string; }>,
         *   }>,
         * }
         */
        searchTreeNodes: Request;
    };
    userType?: UserType;
    searchProps?: any;
    onSelect(nextSelectedKeys: TreeNodeKey[], event: SelectedDataNode, currentDataSource: TreeDataSource): void;
    dataSource: TreeDataSource;
    rootIconType?: IconType;
    selfNameMap?: SelfNameMap;
}
export default interface PropTypes extends Omit<TreeProps, 'dataSource'> {
    treeColWidth?: string;
    routerConfig: RouterConfig;
    request: TreeProps['request'] & {
        /**
         * 请求树节点的子节点列表
         * 参数:
         * { parentId: string }
         * 返回：
         * {
         *   dataSource: Array<{
         *     label: string;
         *     key: string;
         *     children: TreeDataSource
         *   }>,
         * }
         */
        getTreeNodes: Request;
    };
    onSelect: AntDTreeProps['onSelect'];
    selfNameMap?: SelfNameMap;
}
export { PropTypes };
