import { type ReactNode } from "react"; import { type RowGroup, type RowLeaf, type RowSelectionLinked } from "@1771technologies/lytenyte-shared"; import type { TreeViewChildParams, TreeViewItem, TreeViewSelectAllParams } from "./types.js"; import type { DragItem, RowNode } from "../../types.js"; export interface TreeViewProps { readonly items: T[]; readonly children?: (props: TreeViewChildParams) => ReactNode; readonly selectAllSlot?: (params: TreeViewSelectAllParams) => ReactNode; readonly rowHeight?: number; readonly defaultExpansion?: boolean | number; readonly branchJoinSeparator?: string; readonly rowSelectAllShow?: boolean; readonly rowSelectionEnabled?: boolean; readonly rowSelection?: RowSelectionLinked; readonly onRowSelectionChange?: (selection: RowSelectionLinked) => void; readonly rowGroupExpansions?: Record; readonly onRowGroupExpansionChange?: (change: Record) => void; /** * @alpha * @internal * * Do not use this property unless you know what you are doing. Support for tree view drag * and drag is still being prototyped. */ readonly draggable?: boolean; /** * @alpha * @internal * * Do not use this property unless you know what you are doing. Support for tree view drag * and drag is still being prototyped. */ readonly getDragTags?: (row: RowNode, leafs: RowLeaf[]) => Record; /** * @alpha * @internal * * Do not use this property unless you know what you are doing. Support for tree view drag * and drag is still being prototyped. */ readonly onItemsReordered?: (items: T[]) => void; } export interface TreeViewApi { readonly rowsSelected: () => (RowLeaf | RowGroup)[]; } export declare const TreeView: (props: TreeViewProps) => ReactNode;