import React from 'react'; import { Forest, Tree } from 'fp-ts/lib/Tree'; import { CSSProp } from '@monorail/helpers/styled-components'; declare type Key = string; declare type TreeListProps = { forest: Forest; getTreeNodeKey: (a: T) => Key; startExpanded?: boolean; }; declare type Ancestor = { key: Key; index: number; }; export declare type FlattenedNode = { value: T; depth: number; ancestors: Array; isLeaf: boolean; index: number; }; declare type TreeRowToggleAndDepthLineProps = { depth: number; onClick: React.MouseEventHandler; isOpen: boolean; isLeaf: boolean; showDepthLine?: boolean; cssToggle?: CSSProp; }; export declare function flattenWithDepth(rootTree: Tree, toKey: (a: T) => Key, startingIndex: number): Array>; export declare const TreeRowToggleAndDepthLine: (props: TreeRowToggleAndDepthLineProps) => JSX.Element; export declare const useTreeList: (props: TreeListProps) => { rows: FlattenedNode[]; toggleNode: (nodeKey: Key) => void; openRows: string[]; }; export declare const outlineNumbering: (row: FlattenedNode, startingDepth?: number) => string; export {};