import type { AriaRole, KeyboardEventHandler, SyntheticEvent } from 'react'; export type ArrowDirectionEnum = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight'; export type AccessibilityActions = { onClick?: (event?: SyntheticEvent) => void; onTab?: (forward: boolean) => void; onEsc?: () => void; onArrowNavigation?: (direction: ArrowDirectionEnum) => void; }; export type AccessibilityProps = { tabIndex?: number; role?: AriaRole; onKeyDown?: KeyboardEventHandler; }; /** Executes the provided function with setTimeout with 0 delay */ export declare const runInNextCycle: (func: (() => void)) => void; /** * Generates accessibility properties for clickable elements. * @param {boolean} [addIndex] - * @param {AriaRole} [role='button'] - ARIA role attribute to be assigned to the element. * @returns {AccessibilityProps} */ export declare const getClickAccessibilityProps: (params: { /** Object containing action handlers for various key events. */ actions: AccessibilityActions; /** If true, sets the tabIndex to 0 to make the element focusable. */ addIndex?: boolean; /** Accessibility properties including ARIA role and key event handlers. */ role?: AriaRole; }) => AccessibilityProps; /** * Handles arrow key navigation for category elements. * * This function allows users to navigate through keys. * It focuses on the next or previous element and optionally triggers a callback. * * @param {boolean} forward - Whether to move forward (true) or backward (false) in the tab order. * @param {number} index - The current index of the focused element. * @param {HTMLAnchorElement[]} arrayOfRefs - Array of element references to navigate through. * @param {(nextIndex: number) => void} [selectFunction] - Optional callback to handle selection. */ export declare const handleKeyboardNavigation: (forward: boolean, index: number, arrayOfRefs: HTMLAnchorElement[] | HTMLButtonElement[] | HTMLElement[], selectFunction?: (nextIndex: number) => void, shouldFocusNextElement?: boolean) => void;