import { MouseEvent, ReactElement } from 'react';
export type RenderNodeHandler<T = any> = (node: ITreeNodeData<T>, depth: number, state: NodeState, actions: TreeActions, searchQuery: string) => JSX.Element;
export type NodeHandler = (node?: ITreeNodeData) => void;
export type NodeState = {
    expanded: boolean;
    selected: boolean;
};
export type TreeActions = {
    expand: NodeHandler;
    select: NodeHandler;
    selectSingle: NodeHandler;
    deselect: NodeHandler;
};
export type TreeState = {
    expandedKeys: string[];
    selectedKeys: string[];
};
export interface ITreeProps {
    /**
     * Nested Tree Data.
     */
    treeData: ITreeNodeData[];
    /**
     * A function to customize the structure of the node.
     */
    renderNode?: RenderNodeHandler;
    /**
     * an event listener when a node is expanded inside the tree
     */
    onExpandNode?: (expandedKeys: string[]) => void;
    /**
     * expanded keys of the tree.
     */
    expandedKeys?: string[];
    /**
     * node search query
     */
    searchQuery?: string;
    /**
     * expand condition
     */
    expandCondition?: 'always' | 'when-collapsed';
    /**
     * Hanlder for node click event.
     */
    onNodeClick?: NodeHandler;
    /**
     * Renders the encapsolated view
     */
    encapsulated?: boolean;
    /**
     * Extra classname(s)
     */
    className?: string;
}
export interface ITreeNodeData<T = any> {
    key: string;
    title: string;
    index?: number;
    subtitle?: string;
    options?: Partial<{
        singleton: boolean;
        selectable: boolean;
        draggable: boolean;
        focusable: boolean;
        deletable: boolean;
        filterable: boolean;
        importCSV: boolean;
        editable: boolean;
    }>;
    icon?: ReactElement | JSX.Element | string;
    children?: ITreeNodeData[];
    invalid?: boolean;
    data?: T;
}
export interface TreeNodeProps {
    node: ITreeNodeData;
    expandedKeys: string[];
    selectedKeys: string[];
    actions: TreeActions;
    depth: number;
    searchQuery: string;
    renderNode?: RenderNodeHandler;
    onNodeClick?: NodeHandler;
}
export interface ITreeAction {
    name: string;
    icon: ReactElement;
}
export interface ITreeIcon {
    size?: number;
    className?: string;
    onClick?: (ev: MouseEvent) => void;
}
