/**
 * Copyright Aquera Inc 2025
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */
import type { ComboboxDataItem, ComboboxGroupItem, ComboboxRow, ComboboxOptionRow } from './types';
export declare function isGroup(item: any): item is ComboboxGroupItem;
export declare function hasGroups(data: any[]): boolean;
export declare function countOptionsDeep(group: ComboboxGroupItem): number;
export declare function flattenRows(data: ComboboxDataItem[]): ComboboxRow[];
export declare function getOptionRows(rows: ComboboxRow[]): ComboboxOptionRow[];
/**
 * Filter rows by a query.
 *
 * Rules:
 *  - An option row is kept if its searchText matches.
 *  - If a group's label matches, the entire subtree (header + all descendant
 *    options + nested headers) is kept.
 *  - Otherwise a header is kept only if at least one descendant option matches.
 *  - Empty groups (no surviving descendants) are dropped.
 */
export declare function filterRows(data: ComboboxDataItem[], query: string, getSearchText: (item: any) => string): {
    rows: ComboboxRow[];
    visibleOptionCount: number;
};
