import type { OptionGroup } from "../AutoSuggest.types";
/**
 * Groups items into labeled groups with support for a default group.
 * Empty or whitespace-only group labels are treated as belonging to the default group.
 *
 * @returns Array of groups with non-empty options
 *
 * @example
 * const properties = [
 *   { name: "Status", group: "Metadata" },
 *   { name: "Region", group: "Location" },
 *   { name: "Type", group: "" },
 * ];
 * const groups = createGroups(
 *   properties,
 *   (p) => p.group,
 *   "Properties"
 * );
 *
 * Returns:
 * [
 *   { label: "Metadata", options: [{ name: "Status", group: "Metadata" }] },
 *   { label: "Location", options: [{ name: "Region", group: "Location" }] },
 *   { label: "Properties", options: [{ name: "Type", group: "" }] }
 * ]
 */
declare function createGroups<T>(items: T[], getGroupLabel: (item: T) => string | undefined | null, defaultGroupLabel?: string): OptionGroup<T>[];
export { createGroups };
