import { RefObject } from 'react'; type ControlsRef = RefObject; type Direction = 'up' | 'down' | 'left' | 'right'; type Edge = 'previous' | 'next'; export interface ControlEdgeCrossPayload { /** Grid edge that was crossed */ edge: Edge; /** Arrow direction that caused the crossing */ direction: Direction; /** Cell index of the control that had focus */ cellIndex: number; } interface FocusControlInput { controlsRef: ControlsRef; direction: Direction; levelIndex: number; rowIndex: number; cellIndex: number; } /** Focuses control at the given position or the next focusable control in the given direction */ export declare function focusControl({ controlsRef, direction, levelIndex, rowIndex, cellIndex, }: FocusControlInput): void; interface HandleControlKeyDownInput { controlsRef: ControlsRef; levelIndex: number; rowIndex: number; cellIndex: number; event: React.KeyboardEvent; /** Called when arrow navigation runs off the first or the last grid */ onEdgeCross?: (payload: ControlEdgeCrossPayload) => void; /** Text direction, `ArrowLeft` and `ArrowRight` are mirrored in `rtl`, `'ltr'` by default */ dir?: 'ltr' | 'rtl'; } export declare function handleControlKeyDown({ controlsRef, levelIndex, rowIndex, cellIndex, event, onEdgeCross, dir, }: HandleControlKeyDownInput): void; export {};