import { SectionMeta, SelectItem } from '../types/selectFieldInternalTypes';
export type SectionItem = {
    item: SelectItem;
    index: number;
};
export type PinnedSection = {
    type: "pinned";
    label: string;
    items: SectionItem[];
    loading?: boolean;
};
export type GroupSection = {
    type: "group";
    label: string;
    items: SectionItem[];
};
export type FlatSection = {
    type: "flat";
    items: SectionItem[];
};
export type Section = PinnedSection | GroupSection | FlatSection;
export type VirtualRow = {
    type: "item";
    item: SelectItem;
    index: number;
} | {
    type: "header";
    label: string;
    sectionIndex: number;
} | {
    type: "divider";
    sectionIndex: number;
} | {
    type: "load-more";
};
/**
 * Computes grouped sections from a flat items array and section metadata.
 * @param items - The flat items array
 * @param sectionsMeta - Section metadata describing pinned/group ranges
 * @returns Grouped sections for rendering
 */
export declare const useOptionsSections: (items: SelectItem[], sectionsMeta: SectionMeta[]) => Section[];
/**
 * Flattens grouped sections into a linear list of virtual rows for virtualization,
 * and builds a mapping from downshift item index to virtual row index.
 * @param sections - The grouped sections from useOptionsSections
 * @param hasMore - Whether there are more items to load
 * @returns The flat virtual row list and a downshift-to-virtual index mapping
 */
export declare function flattenSectionsToVirtualRows(sections: Section[], hasMore: boolean): {
    virtualRows: VirtualRow[];
    downshiftIndexToVirtualRowIndex: Record<number, number>;
    stickyIndices: number[];
};
