"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

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

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

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

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

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

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

var Container = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
  var fullWidth = _ref.fullWidth,
      rest = (0, _objectWithoutProperties2["default"])(_ref, ["fullWidth"]);

  var _useTheme = (0, _useTheme2["default"])(),
      _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["default"].createElement(_Box["default"], (0, _extends2["default"])({
    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["default"].bool
} : void 0;
var _default = Container;
exports["default"] = _default;