///
import { KeyboardFocusKeys, KeyboardFocusedId, WithEventHandlers, WithKeyboardFocusCallback } from "../types.d";
/**
* A simple hook to get the current keyboard focus context. You are most
* likely looking for the `useKeyboardFocused` or `useKeyboardFocusedClassName`
* hooks instead, but this can be used if you need to add custom keyboard-focus
* ony behavior with the `setFocusedId` callback in the context.
*/
export declare function useKeyboardFocusContext(): import("../types").KeyboardFocusContextType;
/**
* Checks if the provided id is the current focused element and the app is
* in keyboard mode.
*
* @param id The id to check agains
* @return true if the app is in keyboard mode and the id is the current keyboard
* focus
*/
export declare function useKeyboardFocused(id: KeyboardFocusedId): boolean;
/**
* This is a pretty nifty hook that will return a classname for an element
* when it is the current keyboard focus in the app.
*
* @param id The id of the element
* @param focusedClassName The class name to return when the element is focused.
* This defaults to the base `@react-md/states` keyboard focus class name.
* @return the focused class name or the empty stringstring | nule
*/
export declare function useKeyboardFocusedClassName(id: KeyboardFocusedId, focusedClassName?: string): string;
/**
* All the options for a custom keyboard focus handler.
*/
export interface KeyboardFocusOptions extends KeyboardFocusKeys, WithEventHandlers, Required {
}
interface KeyboardFocusResult {
handlers: H & {
onKeyDown: (event: React.KeyboardEvent) => void;
};
}
/**
* Creates an `onKeyDown` event handler to apply to an element so that
* keyboard focus behavior can be implemented.
*
* This is really a event handler function, but it uses the a hook to
* memoize transforming the different keys so it is named like a hook.
*
* @param options All the keyboard focus event options
* @return an keydown handler that can be used on any react element
*/
export declare function useKeyboardFocusEventHandler({ handlers, onKeyboardFocus, incrementKeys, decrementKeys, jumpToFirstKeys, jumpToLastKeys, }: KeyboardFocusOptions): KeyboardFocusResult;
export {};