'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var focus = require('@react-aria/focus');
var React = require('react');
var jsxRuntime = require('react/jsx-runtime');

const FocusBoundary = ({
  children
}) => {
  const wrapperReference = React.useRef(null);
  React.useEffect(() => {
    wrapperReference.current?.focus({
      preventScroll: true
    });
  }, []);
  return /*#__PURE__*/jsxRuntime.jsx(focus.FocusScope, {
    contain: true,
    restoreFocus: true,
    children: /*#__PURE__*/jsxRuntime.jsx("div", {
      ref: wrapperReference,
      tabIndex: -1,
      children: children
    })
  });
};

exports.default = FocusBoundary;
//# sourceMappingURL=FocusBoundary.js.map
