import { SelectFieldGroupByValue, SelectFieldOption } from '../../components/SelectField/types';
import { SelectItem } from '../types/selectFieldInternalTypes';
/**
 * Normalized group section structure used internally.
 * @property label - The group label (derived from groupToString or String(groupValue))
 * @property options - The options belonging to this group
 */
export type NormalizedGroupSection = {
    label: string;
    options: SelectFieldOption[];
};
type UseGroupedOptionsResult = {
    /** Options that have a group property, converted to downshift items */
    groupedItems: SelectItem[];
    /** Options that don't have a group property, converted to downshift items */
    ungroupedItems: SelectItem[];
    /** Metadata about each group section for rendering */
    groupSections: NormalizedGroupSection[];
};
/**
 * Hook that processes options and groups them by their `group` property.
 *
 * Groups are ordered by insertion order (first occurrence of a group value
 * defines its position in the list).
 *
 * @param options - The options to process
 * @param groupToString - Optional function to convert group values to display labels
 * @returns Grouped items, ungrouped items, and group section metadata
 */
export declare function useGroupedOptions(options: SelectFieldOption[], groupToString?: (groupValue: SelectFieldGroupByValue) => string): UseGroupedOptionsResult;
/**
 * Sorts group sections using the provided comparator function.
 * The group value is extracted from the first option in each section.
 *
 * @param sections - The group sections to sort
 * @param groupSorter - Comparator function for group values
 * @returns A new array of sorted sections
 */
export declare function sortGroupSections(sections: NormalizedGroupSection[], groupSorter: (a: SelectFieldGroupByValue, b: SelectFieldGroupByValue) => number): NormalizedGroupSection[];
export {};
