import { Dispatch, Key, MutableRefObject, SetStateAction } from 'react';
import { KEYS } from './constants';
export type KeysType = (typeof KEYS)[keyof typeof KEYS];
export type TreeNavigationAdapter<N> = {
    isExpandedByDefault?: boolean;
    getFlatNodes: (tree: N[]) => TreeNode[];
    getFocusableNodes: (tree: TreeNode[]) => TreeNode[];
};
export type NodeId = string | number;
export type TreeNodesMap = Map<NodeId, TreeNode>;
export type TreeNode = {
    id: NodeId;
    children: NodeId[];
    parent: NodeId | null;
    parents: NodeId[];
    label: string;
    isDisabled: boolean;
    isExpanded: boolean;
    isExpandable: boolean;
    isFocused: boolean;
    isLeaf: boolean;
};
export type TreeNodeMapperResult<N> = {
    node: TreeNode;
    children: Array<N>;
};
export type TreeNodeMapper<N> = (node: N, parents: NodeId[]) => TreeNodeMapperResult<N>;
export type TreeNavigationContextState = {
    focused: TreeNode | null;
    selected: NodeId[];
    isDisabled: boolean;
    nodes: TreeNode[];
    setNodes: Dispatch<SetStateAction<TreeNode[]>>;
    nodesMap: TreeNodesMap;
    refs: MutableRefObject<Map<NodeId, HTMLElement>>;
    setFocused: (id: NodeId) => void;
    setBlurred: (id: NodeId) => void;
    isNodeExpandedByDefault: boolean;
};
export type TreNavigationHookProps = {
    adapter: TreeNavigationAdapter<any>;
    tree: any[];
    isDisabled?: boolean;
};
export type NavigationActionFn = (params: NavigationActionFnArgs) => void;
export type NavigationActionFnArgs = {
    node: TreeNode;
    context: TreeNavigationContextState;
    onToggleExpanded: (isExpanded: boolean) => void;
    onToggleSelected: (isSelected: boolean) => void;
    onCustomButtonKeyDown?: (button?: Key) => void;
    button?: Key;
    isSelected: boolean;
};
