import * as _arrow_navigation_core from '@arrow-navigation/core'; import { FocusEventResult, FocusableElement as FocusableElement$1, FocusableElementOptions, FocusableByDirection, FocusableGroupConfig, BlurEventResult, Direction } from '@arrow-navigation/core'; export { ArrowNavigationEvents, ArrowNavigationOrder, BlurEventResult, Direction, FocusEventResult, FocusableElementOptions, FocusableGroupOptions, FocusableElement as IFocusableElement, FocusableGroup as IFocusableGroup, getArrowNavigation, getElementIdByOrder, initArrowNavigation } from '@arrow-navigation/core'; import * as React$1 from 'react'; import React__default, { ReactNode } from 'react'; type Options$4 = { order?: FocusableElementOptions['order']; onFocus?: FocusableElementOptions['onFocus']; onBlur?: FocusableElementOptions['onBlur']; nextUp?: FocusableByDirection['up']; nextDown?: FocusableByDirection['down']; nextLeft?: FocusableByDirection['left']; nextRight?: FocusableByDirection['right']; }; type ElementFocusEventResult = FocusEventResult; type ElementFocusEvent = (event: ElementFocusEventResult) => void; type ElementBlurEventResult = FocusEventResult; type ElementBlurEvent = (event: ElementBlurEventResult) => void; type FocusableElementWithoutFocusAndBlur = Omit, 'onFocus' | 'onBlur'>; type Props$4 = { id: string; children?: React__default.ReactNode; as?: React__default.ElementType; } & Options$4 & FocusableElementWithoutFocusAndBlur; declare function FocusableElement({ children, id, as, onFocus, onBlur, order, nextDown, nextLeft, nextRight, nextUp, ...props }: Props$4): React__default.ReactElement>; type GroupFocusEventResult = FocusEventResult; type GroupFocusEvent = (event: GroupFocusEventResult) => void; type GroupBlurEventResult = BlurEventResult; type GroupBlurEvent = (event: GroupBlurEventResult) => void; type GroupOptions = { firstElement?: string; byOrder?: 'horizontal' | 'vertical' | 'grid'; cols?: number | Record; saveLast?: boolean; viewportSafe?: boolean; threshold?: number; onFocus?: GroupFocusEvent; onBlur?: GroupBlurEvent; keepFocus?: boolean; arrowDebounce?: boolean; nextUp?: string; nextDown?: string; nextLeft?: string; nextRight?: string; }; type GroupElementWithoutFocusAndBlur = Omit, 'onFocus' | 'onBlur'>; type Props$3 = { id: string; children: ReactNode; as?: React.ElementType; } & GroupOptions & GroupElementWithoutFocusAndBlur; type ContextValue = { groupId: string; registerElement: (id: string, options?: FocusableElementOptions) => void; unregisterElement: (id: string) => void; }; declare function FocusableGroup({ id, as, children, firstElement, byOrder, cols, saveLast, viewportSafe, threshold, onFocus, onBlur, keepFocus, arrowDebounce, nextUp, nextDown, nextLeft, nextRight, ...props }: Props$3): React$1.ReactElement>; declare function useFocusableGroup(): ContextValue; declare function useArrowNavigation(): { getFocusedElement: () => _arrow_navigation_core.FocusableElement | null; setFocusElement: (id: string) => void; setInitialFocusElement: (id: string) => void; registerGroup: (id: string, options?: _arrow_navigation_core.FocusableGroupOptions | undefined) => void; updateGroup: (id: string, options: Omit<_arrow_navigation_core.FocusableGroupConfig, "id">) => void; registerElement: (id: string, groupId: string, options?: _arrow_navigation_core.FocusableElementOptions | undefined) => void; updateElement: (id: string, options: _arrow_navigation_core.FocusableElementOptions) => void; unregisterElement: (id: string) => void; resetGroupState: (id: string) => void; destroy: () => void; getCurrentGroups: () => Set; getGroupElements: (group: string) => Set; getGroupConfig: (group: string) => _arrow_navigation_core.FocusableGroupConfig | undefined; getRegisteredElements: () => Set; getFocusedGroup: () => string | undefined; getNextElement: (opts: { direction: _arrow_navigation_core.Direction; elementId?: string | undefined; } & { inGroup?: boolean | undefined; }) => string | null; getNextGroup: (opts: { direction: _arrow_navigation_core.Direction; elementId?: string | undefined; }) => string | null; handleDirectionPress: (direction: _arrow_navigation_core.Direction, repeat: boolean) => void; on: (eventName: string, callback: (...args: T) => void) => void; off: (eventName: string, callback?: ((...args: T_1) => void) | undefined) => void; _getState: () => _arrow_navigation_core.ArrowNavigationState | null; _setState: (state: _arrow_navigation_core.ArrowNavigationState) => void; _forceNavigate: (key: string) => void; }; type Props$2 = { id: string; } & Options$4; declare function useFocusableElement({ id, nextDown, nextLeft, nextRight, nextUp, order, onBlur, onFocus }: Props$2): void; declare function useWatchElementFocused(id: string): boolean; interface Props$1 { direction?: Direction; group?: string; inGroup?: boolean; } declare function useWatchNextElement({ direction, group, inGroup }?: Props$1): { nextElement: string | null; direction: Direction | undefined; }; interface Props { direction?: Direction; } declare function useWatchNextGroup({ direction }?: Props): { nextGroup: string | null; direction: Direction | undefined; }; interface Options$3 { group?: string; inGroup?: boolean; elementPattern?: RegExp; } declare function useWatchLastElement(direction: Direction, { group, inGroup, elementPattern }?: Options$3): { reachedLastElement: boolean; element: string | null; }; interface Options$2 { group?: string; groupPattern?: RegExp; } declare function useWatchLastGroup(direction: Direction, { group, groupPattern }?: Options$2): { reachedLastGroup: boolean; group: string | null; }; type Callback = () => void; declare function useListenElementFocused(cb: Callback, id: string): void; type LastElementCallback = (element: string | null) => void; interface Options$1 { group?: string; inGroup?: boolean; elementPattern?: RegExp; } declare function useListenLastElementReached(cb: LastElementCallback, direction: Direction, { group, inGroup, elementPattern }?: Options$1): void; type LastGroupCallback = (group: string | null) => void; interface Options { group?: string; groupPattern?: RegExp; } declare function useListenLastGroupReached(cb: LastGroupCallback, direction: Direction, { group, groupPattern }?: Options): void; export { ElementBlurEvent, ElementBlurEventResult, ElementFocusEvent, ElementFocusEventResult, FocusableElement, FocusableGroup, GroupBlurEvent, GroupBlurEventResult, GroupFocusEvent, GroupFocusEventResult, useArrowNavigation, useFocusableElement, useFocusableGroup, useListenElementFocused, useListenLastElementReached, useListenLastGroupReached, useWatchElementFocused, useWatchLastElement, useWatchLastGroup, useWatchNextElement, useWatchNextGroup };