import { FlattenedTreeRow, TreeConfig, TreeRow } from './types';
/**
 * Generates a unique key for a row.
 * Uses row.id if available, otherwise generates from path.
 */
export declare function generateRowKey(row: TreeRow, index: number, parentKey: string | null): string;
/**
 * Flattens a hierarchical tree into a flat array of rows with metadata.
 * Only includes children of expanded nodes.
 */
export declare function flattenTree(rows: readonly TreeRow[], config: TreeConfig, expandedKeys: Set<string>, parentKey?: string | null, depth?: number): FlattenedTreeRow[];
/**
 * Toggles the expansion state of a row.
 * Returns a new Set with the toggled state.
 */
export declare function toggleExpand(expandedKeys: Set<string>, key: string): Set<string>;
/**
 * Expands all nodes in the tree.
 * Returns a Set of all parent row keys.
 */
export declare function expandAll(rows: readonly TreeRow[], config: TreeConfig, parentKey?: string | null, depth?: number): Set<string>;
/**
 * Collapses all nodes.
 * Returns an empty Set.
 */
export declare function collapseAll(): Set<string>;
/**
 * Gets all descendants of a node from the flattened row list.
 * Useful for operations that need to affect an entire subtree.
 */
export declare function getDescendants(flattenedRows: FlattenedTreeRow[], parentKey: string): FlattenedTreeRow[];
/**
 * Finds the path from root to a specific row key.
 * Returns an array of keys from root to the target (inclusive).
 */
export declare function getPathToKey(rows: readonly TreeRow[], targetKey: string, config: TreeConfig, parentKey?: string | null, depth?: number): string[] | null;
/**
 * Expands all ancestors of a specific row to make it visible.
 * Returns a new Set with the required keys added.
 */
export declare function expandToKey(rows: readonly TreeRow[], targetKey: string, config: TreeConfig, existingExpanded: Set<string>): Set<string>;
//# sourceMappingURL=tree-data.d.ts.map