import { FocusEvent, Key, KeyboardEventHandler, RefCallback } from 'react';
import { GetKeyActionFnType } from './utils';
import { KeysType, NodeId, TreeNode } from './types';
export interface NodeNavigationParams {
    id: string | number;
    onToggleExpanded?: (isExpanded: boolean) => void;
    onToggleSelected?: (isSelected: boolean) => void;
    onToggleFocused?: (isFocused: boolean) => void;
    isSelected?: boolean;
    /**
     * Pass event listeners that present in consumer, if any exist.
     * They'll be wrapped invoked on the related event.
     */
    componentProps?: NodeNavigationContainerAttributes;
    onCustomButtonKeyDown?: (button?: Key) => void;
    getKeyActionFn?: GetKeyActionFnType;
    ignoreKeys?: KeysType[] | null;
    preventDefault?: boolean;
}
export type NodeNavigation = {
    ref: RefCallback<any>;
    node: TreeNode;
    /**
     * Pass these attributes on the parent element of the node (treeitem)
     */
    treeItemAttrs: NodeNavigationTreeItemAttributes;
    toggleExpanded: (expanded: boolean) => void;
    toggleSelected: (selected: boolean) => void;
    setFocused: (key: NodeId) => void;
    isFirstFocusable: boolean;
    isDisabled: boolean;
};
export type NodeNavigationContainerAttributes = {
    onFocus: (event: FocusEvent) => void;
    onBlur: (event: FocusEvent) => void;
    onKeyDown: KeyboardEventHandler;
};
export type NodeNavigationTreeItemAttributes = {
    tabIndex: number;
    role: string;
    'aria-disabled': boolean;
    'aria-selected': boolean;
    'aria-level': number;
    'aria-setsize': number;
    'aria-posinset': number;
} & NodeNavigationContainerAttributes;
export declare function useTreeNodeNavigation({ id, onToggleExpanded, onToggleSelected, onToggleFocused, componentProps, isSelected, onCustomButtonKeyDown, getKeyActionFn, ignoreKeys, // ignoring [TAB] allows to navigate to the next element, close menu etc.
preventDefault, }: NodeNavigationParams): NodeNavigation;
