import React from 'react'; import { TextAccessorFn } from './Accessors'; declare type FocusListContext = { focusedItem: any | undefined; activeId?: string; map: WeakMap; }; export declare const FocusListContext: React.Context; export interface FocusProps { children: any; textAccessor: TextAccessorFn; } export interface FocusList { size(): number; focus: (el: HTMLElement | null | undefined) => void; first: () => HTMLElement | undefined; last: () => HTMLElement | undefined; prev(opts?: FocusOptions): HTMLElement | undefined; next(opts?: FocusOptions): HTMLElement | undefined; hasFocused: () => boolean; getFocused: () => TDataItem | undefined; toDataItem: (el: HTMLElement) => TDataItem | undefined; context: FocusListContext; get(): [HTMLElement[], HTMLElement | undefined]; } interface FocusOptions { behavior?: 'clear' | 'stop' | 'loop'; } interface FocusListOptions { scope: React.MutableRefObject; anchorItem?: TDataItem; focusFirstItem?: boolean; scopeSelector?: string; activeId?: string; } export declare function useListOption(dataItem: TDataItem): readonly [React.RefObject, boolean, string | undefined]; export declare const useFocusList: ({ scope: listRef, anchorItem, focusFirstItem, scopeSelector, activeId, }: FocusListOptions) => FocusList; export {}; //# sourceMappingURL=FocusListContext.d.ts.map