"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TreeNavigationProvider = exports.TreeNavigationContext = void 0;
var _react = _interopRequireDefault(require("react"));
var _useTreeNavigation = require("./use-tree-navigation");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const TreeNavigationContext = exports.TreeNavigationContext = /*#__PURE__*/_react.default.createContext({
  focused: null,
  selected: [],
  nodes: [],
  setNodes: () => {},
  isDisabled: false,
  nodesMap: new Map(),
  refs: {
    current: new Map()
  },
  setFocused: () => {},
  setBlurred: () => {},
  isNodeExpandedByDefault: false
});
const TreeNavigationProvider = ({
  children,
  adapter,
  tree,
  isDisabled = false
}) => {
  const navigation = (0, _useTreeNavigation.useTreeNavigation)({
    adapter,
    tree,
    isDisabled
  });
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TreeNavigationContext.Provider, {
    value: navigation,
    children: children
  });
};
exports.TreeNavigationProvider = TreeNavigationProvider;