import type { ReactElement, ReactNode, Ref } from 'react'; import type { TreeViewProps } from './TreeView.cjs'; /** Minimal shape RichTreeView expects; extra fields are passed through untouched. */ export type RichTreeViewItem = { id?: string; label?: ReactNode; children?: RichTreeViewItem[]; [key: string]: unknown; }; export interface RichTreeViewProps extends TreeViewProps { /** Hierarchical data. */ items: T[]; /** Derive a stable id. Default `item.id`. */ getItemId?: (item: T) => string; /** Derive the row label. Default `item.label`. */ getItemLabel?: (item: T) => ReactNode; /** Derive child items. Default `item.children`. */ getItemChildren?: (item: T) => T[] | undefined; /** Optional per-item leading icon. */ getItemIcon?: (item: T) => ReactNode; } /** * Data-driven tree. Renders a `TreeView` from a `items` array; all expansion / * selection props are forwarded to the underlying `TreeView`. */ export declare const RichTreeView: (props: RichTreeViewProps & { ref?: Ref; }) => ReactElement;