/**
 * @file groupItems.ts
 * @input Array of SearchableItem with optional auxiliaryData.group
 * @output Grouped structure preserving insertion order
 * @position Shared utility; used by CommandPalette, trigger menu, and
 *   any future component that needs to group search results by category.
 */
import type { SearchableItem } from '../Typeahead/types';
/**
 * A group of items with an optional heading.
 * `heading` is null for ungrouped items.
 */
export interface ItemGroup<T extends SearchableItem = SearchableItem> {
    heading: string | null;
    items: T[];
}
/**
 * Extract the group string from an item's auxiliaryData.
 */
export declare function getItemGroup(item: SearchableItem): string | undefined;
/**
 * Group items by `auxiliaryData.group`, preserving insertion order of groups.
 * Ungrouped items are collected into a final group with `heading: null`.
 *
 * If no items have a group, returns a single entry with `heading: null`.
 *
 * @example
 * ```
 * const items = [
 *   {id: '1', label: 'Home', auxiliaryData: {group: 'Navigation'}},
 *   {id: '2', label: 'Settings', auxiliaryData: {group: 'Navigation'}},
 *   {id: '3', label: 'Dark mode', auxiliaryData: {group: 'Preferences'}},
 *   {id: '4', label: 'Help'},
 * ];
 *
 * groupItems(items)
 * // [
 * //   {heading: 'Navigation', items: [{id:'1',...}, {id:'2',...}]},
 * //   {heading: 'Preferences', items: [{id:'3',...}]},
 * //   {heading: null, items: [{id:'4',...}]},
 * // ]
 * ```
 */
export declare function groupItems<T extends SearchableItem>(items: T[]): ItemGroup<T>[];
//# sourceMappingURL=groupItems.d.ts.map