import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import useTheme from '../hooks/useTheme';
import Box from '../Box';
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
  var fullWidth = _ref.fullWidth,
      rest = _objectWithoutProperties(_ref, ["fullWidth"]);

  var _useTheme = useTheme(),
      _useTheme$grid = _useTheme.grid;

  _useTheme$grid = _useTheme$grid === void 0 ? {} : _useTheme$grid;
  var _useTheme$grid$gutter = _useTheme$grid.gutters,
      gutters = _useTheme$grid$gutter === void 0 ? 2 : _useTheme$grid$gutter;
  return /*#__PURE__*/React.createElement(Box, _extends({
    ref: ref,
    px: gutters,
    variant: fullWidth ? 'containerFluid' : 'container',
    mx: "auto",
    width: 1
  }, rest));
});
Container.displayName = 'Container';
process.env.NODE_ENV !== "production" ? Container.propTypes = {
  fullWidth: PropTypes.bool
} : void 0;
export default Container;