"use strict";

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

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

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _grid = require("./grid.proptypes");

var _grid2 = require("./grid.css-rules");

var _breakpoints = require("../../../breakpoints");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var GridInternals = _styledComponents["default"].div.withConfig({
  displayName: "GridInternals",
  componentId: "sc-1igck8j-0"
})(["display:flex;flex-wrap:wrap;margin-right:-", ";> *{box-sizing:border-box;padding-right:", ";}"], _grid2.gutterSize, _grid2.gutterSize);

var GridWrapper = _styledComponents["default"].div.withConfig({
  displayName: "GridWrapper",
  componentId: "sc-1igck8j-1"
})(["margin-left:auto;margin-right:auto;box-sizing:border-box;width:100%;padding:0 ", ";@media (min-width:", "){padding:0 ", ";max-width:", ";}@media (min-width:", "){padding:0 ", ";max-width:", ";}@media (min-width:", "){padding:0 ", ";max-width:", ";}"], _grid2.containerPaddingSm, _breakpoints.bpMedium, _grid2.containerPaddingMd, _breakpoints.bpMedium, _breakpoints.bpLarge, _grid2.containerPaddingLg, _breakpoints.bpLarge, _breakpoints.bpXLarge, _grid2.containerPaddingLg, _breakpoints.bpXLarge);

var Grid = (0, _styledComponents["default"])(function (_ref) {
  var children = _ref.children,
      props = _objectWithoutProperties(_ref, ["children"]);

  return _react["default"].createElement(GridWrapper, props, _react["default"].createElement(GridInternals, props, children));
}).withConfig({
  displayName: "Grid",
  componentId: "sc-1igck8j-2"
})([""]);
exports.Grid = Grid;
Grid.displayName = 'Grid';
Grid.propTypes = _grid.gridPropTypes;