import { default as React } from 'react'; import { TreeProps as AriaTreeProps } from 'react-aria-components'; import { TreeItemRenderProps } from './TreeItem/TreeItem'; import { TreeItemKey } from './useTreeState'; export interface TreeBaseProps { /** The items to render in the tree. */ items: T[]; /** Custom render function for tree items. If not provided, uses default TreeItemContent. */ renderItem?: (props: TreeItemRenderProps) => React.ReactNode; /** A function that returns a unique key for an item object. */ getItemValue: (item: T) => V; /** A function that returns the children for an item object. */ getItemChildren: (item: T) => T[]; /** A function that returns whether an item has children. Used for lazy loading items */ getItemHasChildren?: (item: T) => boolean; /** A function that returns the text label for an item. */ getItemTextLabel: (item: T) => string; /** A function that returns the text description for an item. */ getItemTextDescription?: (item: T) => string | undefined; /** Handler called when children need to be loaded for an item. Returns a promise of child values. */ onLoadChildren?: (values: V) => Promise; /** Set of item keys that are currently loading their children. */ loadingValues?: Set; /** The currently selected item values (controlled). */ value?: V[]; /** The default selected item values (uncontrolled). */ defaultValue?: V[]; /** Handler called when the selection changes. */ onChange?: (values: V[]) => void; /** The currently expanded item values (controlled). */ expandedValues?: V[]; /** The default expanded item values (uncontrolled). */ defaultExpandedValues?: V[]; /** Handler called when expanded items change. */ onExpandedChange?: (expandedValues: V[]) => void; /** Accessible label for the tree. */ label: string; /** Drag and drop hooks for enabling drag and drop functionality. */ dragAndDropHooks?: AriaTreeProps['dragAndDropHooks']; /** Display checkbox error state. */ error?: boolean; /** Display checkbox warning state. */ warning?: boolean; /** The id for the tree. */ id?: string; } export declare function TreeBase({ items, renderItem, getItemValue, getItemChildren, getItemHasChildren, getItemTextLabel, getItemTextDescription, onLoadChildren, loadingValues, value: valueProp, defaultValue: defaultValueProp, onChange, expandedValues: expandedValuesProp, defaultExpandedValues: defaultExpandedValuesProp, onExpandedChange, label, dragAndDropHooks, error, warning, id, ...restProps }: TreeBaseProps): React.JSX.Element;