import _extends from "@babel/runtime/helpers/esm/extends";
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import useTheme from '../hooks/useTheme';
import Box from '../Box';

var Container = function Container(_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,
      breakpoints = _useTheme.breakpoints;
  return /*#__PURE__*/React.createElement(Box, _extends({
    px: gutters,
    mx: "auto",
    width: 1,
    sx: {
      maxWidth: fullWidth || !breakpoints ? 'none' : ['none'].concat(_toConsumableArray(breakpoints))
    }
  }, rest));
};

process.env.NODE_ENV !== "production" ? Container.propTypes = {
  fullWidth: PropTypes.bool
} : void 0;
export default Container;