export interface UseRovingTabIndexOptions<T> {
    /** Array of items in the group. */
    items: T[];
    /** Index of the currently active (selected) item. */
    activeIndex: number;
    /** Callback when an item is activated by keyboard or click. */
    onActivate: (index: number) => void;
    /** Axis of navigation. Determines which arrow keys are used. */
    orientation: 'horizontal' | 'vertical';
    /** Whether arrow key navigation wraps around at the ends. Defaults to true. */
    loop?: boolean;
}
export interface UseRovingTabIndexReturn {
    /**
     * Returns props to spread on each item element at the given index.
     *
     * Includes `tabIndex`, `aria-selected`, `onKeyDown`, `onClick`, and
     * a `ref` callback that stores the DOM element for focus management.
     *
     * Matches the Arrow Tabs pattern where tabs use `tabindex="0"` on the
     * active tab and `tabindex="-1"` on all others, with ArrowLeft/ArrowRight
     * navigation, Home/End, and Enter/Space selection.
     */
    getItemProps: (index: number) => {
        tabIndex: 0 | -1;
        'aria-selected': boolean;
        onKeyDown: (e: React.KeyboardEvent) => void;
        onClick: () => void;
        ref: (el: HTMLElement | null) => void;
    };
}
/**
 * Manages roving tabindex keyboard navigation for Arrow components
 * like Tabs, RadioGroup, ChipsRadioGroup, and StyledRadioGroup.
 *
 * Implements the roving tabindex pattern where only the active item
 * is in the tab order (`tabIndex={0}`), all others have `tabIndex={-1}`,
 * and arrow keys move focus between items.
 *
 * Keyboard behavior:
 * - ArrowRight/ArrowDown: move to next item
 * - ArrowLeft/ArrowUp: move to previous item
 * - Home: move to first item
 * - End: move to last item
 * - Enter/Space: activate the focused item
 *
 * Focus follows selection — when an item is activated, it receives DOM focus.
 *
 * @example
 * const { getItemProps } = useRovingTabIndex({
 *   items: tabs,
 *   activeIndex: selectedTab,
 *   onActivate: setSelectedTab,
 *   orientation: 'horizontal',
 * });
 *
 * {tabs.map((tab, i) => (
 *   <button role="tab" {...getItemProps(i)}>{tab.label}</button>
 * ))}
 */
export declare function useRovingTabIndex<T>({ items, activeIndex, onActivate, orientation, loop, }: UseRovingTabIndexOptions<T>): UseRovingTabIndexReturn;
//# sourceMappingURL=useRovingTabIndex.d.ts.map