"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PageWrapper = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireWildcard(require("styled-components"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getBreakpointStyles = function getBreakpointStyles(size) {
  return (0, _styledComponents.css)(["", "{max-width:", "px;padding:0 ", "px;}"], function (p) {
    return p.theme.media.greaterThan(p.theme.breakpoints[size]);
  }, function (p) {
    return p.theme.breakpoints[size].size;
  }, function (p) {
    return p.theme.spacing.unit(p.theme.breakpoints[size].offset);
  });
};
var Outer = _styledComponents.default.div.withConfig({
  displayName: "PageWrapper__Outer",
  componentId: "sc-1ur2ylx-0"
})(["", ""], function (p) {
  return p.background ? "background-color: ".concat(p.background(p.theme)) : '';
});
var Inner = _styledComponents.default.div.withConfig({
  displayName: "PageWrapper__Inner",
  componentId: "sc-1ur2ylx-1"
})(["box-sizing:border-box;margin:0 auto;", ";", ";", ";", ";", " @media print{max-width:none;}"], getBreakpointStyles('sm'), getBreakpointStyles('md'), getBreakpointStyles('lg'), getBreakpointStyles('xl'), function (_ref) {
  var theme = _ref.theme;
  return theme.isFeatureEnabled('shadows') && "\n      ".concat(theme.media.lessThan(theme.breakpoints.sm), " {\n        margin: 0px ").concat(theme.spacing.unit(4), "px;\n      }\n  ");
});
var components = {
  Inner: Inner
};
var PageWrapper = exports.PageWrapper = function PageWrapper(_ref2) {
  var children = _ref2.children,
    background = _ref2.background,
    className = _ref2.className;
  return _react.default.createElement(Outer, {
    background: background,
    className: className
  }, _react.default.createElement(Inner, null, children));
};
PageWrapper.components = components;
PageWrapper.displayName = 'PageWrapper';