import type { TreeNode } from "./tree-node";
/**
 * Filters a {@link TreeNode} hierarchy by a search query.
 *
 * Returns a new tree containing only nodes whose `name` matches
 * the query (case-insensitive substring), plus all ancestor folders
 * needed to preserve the hierarchy. Folder nodes that match are
 * included with all their original children (the match implies the
 * entire subtree is relevant). Folder nodes that do not match
 * themselves are included only when they contain matching descendants.
 *
 * Returns the original `tree` reference when `query` is empty or
 * whitespace-only, preserving referential stability for downstream
 * `React.memo` consumers.
 */
export declare function filterFileTree(tree: readonly TreeNode[], query: string): readonly TreeNode[];
//# sourceMappingURL=filterFileTree.d.ts.map