import { MutableRefObject } from 'react'; type HotkeyFocusParams = { disabled: boolean; hotkey: string; onHotkeyIn?: () => void | Promise; onHotkeyOut?: () => void | Promise; refToFocus: MutableRefObject; rootRef: MutableRefObject; }; /** * A hook that listens for a hotkey press and focuses an element when the hotkey is pressed. * The hook also listens for the Escape key to blur the element and refocus the previous element. * * @param params * @param params.disabled - If true, the hotkey will not be active * @param params.hotkey - The key to press to focus the element * @param params.onHotkeyIn - A function to run when the hotkey is pressed; this runs before the element is focused * @param params.onHotkeyOut - A function to run when the user presses Escape after focusing the element * @param params.refToFocus - The ref to the element that will be focused when the hotkey is pressed * @param params.rootRef - The ref to the element that will listen for changes to focus, disabling the Escape key */ export declare const useHotkeyFocus: ({ disabled, hotkey, onHotkeyIn, onHotkeyOut, refToFocus, rootRef, }: HotkeyFocusParams) => { returnFocusRef: MutableRefObject; }; export {};