import type * as React from "react"; /** Normalized tree node — the conventional `treeData` / Cascader `options` shape. */ export type TreeOption = { value: string; label: React.ReactNode; disabled?: boolean; disableCheckbox?: boolean; /** When false with `loadData`, shows expand affordance */ isLeaf?: boolean; /** * Per-node glyph, drawn by `Tree` when `showIcon` is on. Carried through the normalizer so the * page tree and the dropdown tree keep ONE node shape; `TreeSelect` simply never reads it. */ icon?: React.ReactNode; children?: TreeOption[]; }; export type TreeFieldNames = { label?: string; value?: string; children?: string; }; export type NormalizedTreeOption = TreeOption & { children?: NormalizedTreeOption[]; }; type RawTreeNode = Record; export declare function reactNodeText(value: React.ReactNode): string; export declare function normalizeTreeOptions(nodes: RawTreeNode[] | undefined, fieldNames?: TreeFieldNames): NormalizedTreeOption[]; export declare function getNodeByPath(options: NormalizedTreeOption[], path: string[]): NormalizedTreeOption[]; export declare function getOptionsAtPath(options: NormalizedTreeOption[], path: string[]): NormalizedTreeOption[]; export declare function formatPathLabels(chain: NormalizedTreeOption[], separator?: string): string; export type TreePath = { path: string[]; labels: string[]; }; export declare function collectLeafPaths(options: NormalizedTreeOption[], prefix?: string[], root?: NormalizedTreeOption[]): TreePath[]; export declare function collectAllPaths(options: NormalizedTreeOption[], prefix?: string[], root?: NormalizedTreeOption[]): TreePath[]; export declare function pathKey(path: string[]): string; export declare function pathsEqual(a: string[], b: string[]): boolean; export declare function filterTreeOptions(options: NormalizedTreeOption[], query: string, filter?: (query: string, path: NormalizedTreeOption[]) => boolean): TreePath[]; export declare function getDescendantValues(node: NormalizedTreeOption): string[]; export declare function flattenVisibleTree(options: NormalizedTreeOption[], expandedKeys: Set, depth?: number): { node: NormalizedTreeOption; depth: number; hasChildren: boolean; }[]; export declare function filterVisibleTree(options: NormalizedTreeOption[], query: string): { node: NormalizedTreeOption; depth: number; hasChildren: boolean; }[]; export declare function collectAllExpandableKeys(options: NormalizedTreeOption[]): string[]; export declare function findNodeByValue(options: NormalizedTreeOption[], value: string): NormalizedTreeOption | undefined; export {};