"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TreeViewProvider = TreeViewProvider;
var React = _interopRequireWildcard(require("react"));
var _TreeViewContext = require("./TreeViewContext");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * Sets up the contexts for the underlying TreeItem components.
 *
 * @ignore - do not document.
 */
function TreeViewProvider(props) {
  const {
    value,
    children
  } = props;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TreeViewContext.TreeViewContext.Provider, {
    value: value,
    children: value.wrapRoot({
      children,
      instance: value.instance
    })
  });
}