import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["scrollable", "children"];
import React, { forwardRef } from 'react';
import { Box } from '../../index';
var Body = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var scrollable = _ref.scrollable,
      children = _ref.children,
      rest = _objectWithoutProperties(_ref, _excluded);

  if (!scrollable) {
    return /*#__PURE__*/React.createElement("div", {
      ref: ref
    }, children);
  }

  return /*#__PURE__*/React.createElement(Box, _extends({
    display: "flex",
    flexDirection: "column",
    overflowY: "auto"
  }, rest, {
    ref: ref
  }), children);
});
Body.displayName = 'Body';
export default Body;