"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.css-rules");

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

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

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-1fj55dk-0"
})(["display:flex;flex-wrap:wrap;@media (min-width:", "){margin-right:-", ";> *{box-sizing:border-box;padding-right:", ";}}"], _breakpoints.bpMedium, _grid.gutterSize, _grid.gutterSize);

var GridWrapper = _styledComponents["default"].div.withConfig({
  displayName: "GridWrapper",
  componentId: "sc-1fj55dk-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:", ";}"], _grid.containerPaddingSm, _breakpoints.bpMedium, _grid.containerPaddingMd, _breakpoints.bpMedium, _breakpoints.bpLarge, _grid.containerPaddingLg, _breakpoints.bpLarge, _breakpoints.bpXLarge, _grid.containerPaddingLg, _breakpoints.bpXLarge);

var Grid = (0, _styledComponents["default"])(function (_ref) {
  var children = _ref.children,
      dataQa = _ref['data-qa'],
      dataCy = _ref['data-cy'],
      id = _ref.id,
      props = _objectWithoutProperties(_ref, ["children", "data-qa", "data-cy", "id"]);

  return /*#__PURE__*/_react["default"].createElement(GridWrapper, _extends({
    "data-cy": dataCy,
    "data-qa": dataQa
  }, props, {
    id: id
  }), /*#__PURE__*/_react["default"].createElement(GridInternals, props, children));
}).withConfig({
  displayName: "Grid",
  componentId: "sc-1fj55dk-2"
})([""]);
exports.Grid = Grid;
Grid.displayName = 'Grid';