import type { RefObject } from 'react';
import type { SelectorOptionData } from './types';
interface UseSelectedItemOffsetOptions {
    isOpen: boolean;
    selectedItemIndex: number;
    listboxId: string;
    listboxRef: RefObject<HTMLDivElement | null>;
    anchorRef: RefObject<HTMLElement | null>;
}
interface UseSelectedItemOffsetResult {
    offset: number;
    isPositioned: boolean;
}
/**
 * Calculates the offset needed to position the dropdown so that the selected
 * item appears centered over the outer selector control (macOS-style selector).
 *
 * The desired dropdown top is calculated directly from the anchor center and
 * selected-item center, then clamped to the viewport. This preserves the
 * default "selected item over trigger" behavior while letting the menu slide
 * upward near the bottom edge or downward near the top edge instead of being
 * clipped off-screen.
 */
export declare function useSelectedItemOffset({ isOpen, selectedItemIndex, listboxId, listboxRef, anchorRef, }: UseSelectedItemOffsetOptions): UseSelectedItemOffsetResult;
interface UseComboboxOptions {
    selectableItems: SelectorOptionData[];
    value?: string;
    isDisabled?: boolean;
    isOpen: boolean;
    hasSearch?: boolean;
    onOpen: () => void;
    onClose: () => void;
    onSelect?: (value: string) => void;
    /**
     * Clear the current value. When provided, pressing Delete or Backspace on the
     * closed trigger clears the selection — a keyboard equivalent of the clear
     * button, so clearing is not mouse-only. No-op when the popup is open (arrow
     * navigation owns those keys there) or when there is no value.
     */
    onClear?: () => void;
    listboxId: string;
}
interface UseComboboxResult {
    highlightedIndex: number;
    setHighlightedIndex: (index: number) => void;
    getItemId: (index: number) => string;
    onTriggerClick: () => void;
    onKeyDown: (e: React.KeyboardEvent) => void;
    onItemSelect: (item: SelectorOptionData) => void;
    onItemMouseEnter: (item: SelectorOptionData, index: number) => void;
}
/**
 * Handles keyboard navigation, typeahead search, and selection for combobox/listbox patterns.
 */
export declare function useCombobox({ selectableItems, value, isDisabled, isOpen, hasSearch, onOpen, onClose, onSelect, onClear, listboxId, }: UseComboboxOptions): UseComboboxResult;
export {};
//# sourceMappingURL=hooks.d.ts.map