import type { RefObject } from 'react'; import type { ElementOrRef } from '../types'; type useMnemonicsOptions = { /** * The container element or ref to use for matching elements for mnemonics. * If not provided, the hook will return a ref that should be attached to a container. */ elementOrRef?: ElementOrRef; /** * CSS selector to match for elements, defaults to focusable descendants. */ matchingElementsSelector?: string; /** * Callback fired when a matching element is found via mnemonic keyboard entry. */ onMatch: (element: HTMLElement) => void; /** * Whether mnemonic navigation is enabled. Defaults to true. */ enabled?: boolean; }; type useMnemonicsResults = RefObject; /** * A hook that provides mnemonic navigation for keyboard users. * * Mnemonics allow users to quickly navigate to elements by typing the first * letter of the element's text content. Pressing the same letter repeatedly * cycles through all matching elements. */ export default function useMnemonics({ elementOrRef, matchingElementsSelector, onMatch, enabled }: useMnemonicsOptions): useMnemonicsResults; export {};