import { MainMenuItem, MenuEntry, MenuGroup } from './types'; /** Recursively determine whether any descendant of `group` is the active item. */ export declare function isChildGroupActive(group: MenuGroup, activeItemId?: string): boolean; /** Flatten a (possibly nested) menu tree into a flat list of leaf items. */ export declare function extractItems(entries: MenuEntry[]): MainMenuItem[]; /** * Strip wildcard characters from a raw search string. The presence of a `*` * signals that URLs should also be searched, which the caller decides before * normalizing (see `filterMenu`'s `searchUrls` option). */ export declare function normalizeSearch(search: string): string; /** Whether an entry (or, for a group, any descendant) matches the query. */ export declare function entryMatches(entry: MenuEntry, qLower: string, searchUrls: boolean): boolean; export interface FilterMenuResult { /** The filtered entries to render. */ entries: MenuEntry[]; /** Ids of groups that should be expanded to reveal matches. */ expandIds: Set; } /** * Filter a menu tree by `query` (expected already lower-cased). A group whose * own label matches keeps all of its children; otherwise it keeps only the * descendants that match. Entries with `hiddenFromFilter` are skipped like * dividers. Pass `searchUrls: true` to also match an item's `entryPointUrl` * (used for wildcard searches). */ export declare function filterMenu(items: MenuEntry[], query: string, options?: { searchUrls?: boolean; }): FilterMenuResult;