import React from 'react';
import { useTreeNavigation } from './use-tree-navigation';
import { jsx as _jsx } from "react/jsx-runtime";
export const TreeNavigationContext = /*#__PURE__*/React.createContext({
  focused: null,
  selected: [],
  nodes: [],
  setNodes: () => {},
  isDisabled: false,
  nodesMap: new Map(),
  refs: {
    current: new Map()
  },
  setFocused: () => {},
  setBlurred: () => {},
  isNodeExpandedByDefault: false
});
export const TreeNavigationProvider = ({
  children,
  adapter,
  tree,
  isDisabled = false
}) => {
  const navigation = useTreeNavigation({
    adapter,
    tree,
    isDisabled
  });
  return /*#__PURE__*/_jsx(TreeNavigationContext.Provider, {
    value: navigation,
    children: children
  });
};