/**
 * @packageDocumentation
 * @module utils
 */
/** Recursive filter without presume data structure
 *
 * @example 1. Nested Tree
 *
 * ```
 * interface Node {
 *   ...,
 *   children: Node[]
 * }
 *
 * const filter = createRecursiveFilter(
 *   (node: Node) => node.children,
 *   (node: Node, children: Node[]) => ({ ...node, children }),
 *  );
 * ```
 *
 * @example 2. Normalized Tree
 *
 * ```
 * interface Node {
 *   id: string;
 *   children: string[];
 * }
 *
 * interface NodeEntities {
 *   [id: string]: Node;
 * }
 *
 * const nodes: NodeEntities;
 *
 * const filter = createRecursiveFilter(
 *   (node: Node) => node.children.map(id => nodes[id]),
 *   (node: Node, children: Node[]) => ({ ...node, children: children.map(child => child.id) }),
 * );
 * ```
 */
export declare const createRecursiveFilter: <T>(pickChildren?: (item: T) => T[], mergeChildren?: (item: T, children: T[]) => T) => (items: T[], condition: (item: T) => boolean) => T[];
