"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _useTheme2 = _interopRequireDefault(require("../hooks/useTheme"));

var _Box = _interopRequireDefault(require("../Box"));

var Container = function Container(_ref) {
  var fullWidth = _ref.fullWidth,
      rest = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["fullWidth"]);

  var _useTheme = (0, _useTheme2.default)(),
      breakpoints = _useTheme.breakpoints;

  return (
    /*#__PURE__*/
    _react.default.createElement(_Box.default, (0, _extends2.default)({
      px: 2,
      mx: "auto",
      width: 1,
      sx: {
        maxWidth: fullWidth ? 'none' : ['none'].concat(breakpoints)
      }
    }, rest))
  );
};

process.env.NODE_ENV !== "production" ? Container.propTypes = {
  fullWidth: _propTypes.default.bool
} : void 0;
var _default = Container;
exports.default = _default;