import { compare, record, state as xstate } from '@synnaxlabs/x'; import { ReactElement } from 'react'; import { Component } from '../component'; import { Haul } from '../haul'; import { List } from '../list'; import { Select } from '../select'; import { Node, Shape } from './base'; export declare const HAUL_TYPE = "tree_item"; export type HaulItem = Haul.Item; export declare const createHaulItem: (key: string) => HaulItem; export declare const isHaulItem: (item: Haul.Item) => item is HaulItem; export declare const filterHaulItems: (items: Haul.Item[]) => HaulItem[]; export declare const canDropHaulItem: Haul.CanDrop; export interface HandleExpandProps { current: K[]; action: "expand" | "contract"; clicked: K; } export interface UseProps { onExpand?: (props: HandleExpandProps) => void; selected?: K[]; sort?: compare.Comparator>; onSelectedChange?: xstate.Setter; initialExpanded?: K[]; nodes: Node[]; } export interface UseReturn { selected: K[]; onSelect: Select.UseMultipleProps["onChange"]; expanded: K[]; expand: (key: K) => void; contract: (...keys: K[]) => void; clearExpanded: () => void; shape: Shape; } export declare const use: ({ onExpand, nodes, initialExpanded, selected: propsSelected, onSelectedChange, sort, }: UseProps) => UseReturn; export interface ItemRenderProps extends List.ItemRenderProps { } export interface TreeProps> extends Omit, "children" | "ref" | "virtualizer" | "data" | "onChange">, Omit, "children" | "onSelect">, UseReturn { children: Component.RenderProp>; showRules?: boolean; shape: Shape; } export declare const Tree: >({ shape, children, selected, onSelect, getItem, subscribe, className, contract: _, expand: __, expanded: ___, className: ____, clearExpanded: _____, showRules, virtual, itemHeight, overscan, onFetchMore, ...rest }: TreeProps) => ReactElement; //# sourceMappingURL=Tree.d.ts.map