import { Dispatch, FC, ReactNode, SetStateAction } from "react";
import { IconTypesKeys } from "../../atoms/Icon";
export declare type TreeId = string | number;
export declare type TreeItemProps<T = any> = {
    id: TreeId;
    data?: T;
    text: string;
    description?: string;
    className?: string;
    icon?: IconTypesKeys;
    customIcon?: ReactNode;
    disabled?: boolean;
    selectable?: boolean;
    withTooltip?: boolean;
    isLeaf?: boolean;
    loading?: boolean;
    totalCount?: number;
    children?: TreeItemProps[];
    additionalInfo?: ReactNode;
    onClick?: VoidFunction;
};
export interface TreeItemComponentProps<T = any> {
    item: TreeItemProps<T>;
    parentItem?: TreeItemProps<T>;
    loadMoreText?: string;
    isExpanded?: boolean;
    isIndeterminate?: boolean;
    isSelected?: boolean;
    isDisabled?: boolean;
    selectable?: boolean;
    renderTree: (children?: TreeItemProps<T>[], isExpanded?: boolean, parentItem?: TreeItemProps<T>) => ReactNode;
    withLoadMore?: boolean;
    onLoadMore?: (item: TreeItemProps<T>) => Promisable<void>;
    onExpand: (item: TreeItemProps<T>, isExpanded: boolean, onlyReload?: boolean) => Promisable<void>;
    onSelect?: (item: TreeItemProps<T>) => void;
    onItemClick?: (item: TreeItemProps<T>) => void;
    onItemUpdate?: (id: TreeId, updateFn: (item: TreeItemProps<T>) => TreeItemProps<T>) => Promisable<void>;
    setData?: Dispatch<SetStateAction<TreeItemProps<T>[]>>;
}
export interface PartialLoadData<T> {
    children: TreeItemProps<T>[];
    totalCount?: number;
}
export declare type TreeProps<T = any> = {
    className?: string;
    loadMoreText?: string;
    data: TreeItemProps<T>[];
    setData?: Dispatch<SetStateAction<TreeItemProps<T>[]>>;
    loadNode?: (item: TreeItemProps<T>, offset?: number) => Promisable<PartialLoadData<T>>;
    partialNodeMerge?: boolean;
    withLoadMore?: boolean;
    expanded?: TreeId[];
    allExpanded?: boolean;
    allSelected?: boolean;
    selectable?: boolean;
    selected?: TreeId[];
    setExpanded?: (ids: TreeId[]) => void;
    setSelected?: (ids: TreeId[]) => void;
    onExpand?: (item: TreeItemProps<T>, isExpanded: boolean, onlyReload?: boolean) => Promisable<void>;
    onItemClick?: (item: TreeItemProps<T>) => void;
    Item?: FC<TreeItemComponentProps>;
};
