import _extends from "@babel/runtime/helpers/esm/extends";
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';

const Container = (_ref) => {
  let {
    fullWidth
  } = _ref,
      rest = _objectWithoutProperties(_ref, ["fullWidth"]);

  const {
    grid: {
      gutters = 2
    } = {},
    breakpoints
  } = useTheme();
  return /*#__PURE__*/React.createElement(Box, _extends({
    px: gutters,
    mx: "auto",
    width: 1,
    sx: {
      maxWidth: fullWidth || !breakpoints ? 'none' : ['none', ...breakpoints]
    }
  }, rest));
};

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