"use strict";

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

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

var _core = require("@emotion/core");

var _Header = _interopRequireDefault(require("../Header/Header"));

var _FooterNew = _interopRequireDefault(require("../FooterNew/FooterNew"));

var _CollectionHero = _interopRequireDefault(require("../Hero/CollectionHero"));

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

function _templateObject2() {
  var data = _taggedTemplateLiteral(["\n  padding-top: ", "px;\n"]);

  _templateObject2 = function _templateObject2() {
    return data;
  };

  return data;
}

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  padding: 0px 24px;\n  @media (max-width: 640px) {\n    padding: 0px 6px;\n  }\n\n  > p {\n    width: 100%;\n    max-width: 700px;\n    font-size: 18px;\n    margin-bottom: 1.5em;\n    line-height: 1.8;\n\n    &.transition {\n      margin: 80px auto;\n    }\n\n    &.small {\n      font-size: 14px;\n    }\n  }\n\n  & > p,\n  & > h1,\n  & > h2,\n  & > h3,\n  & > h4,\n  & > h5,\n  & > h6 {\n    margin: auto;\n    @media (max-width: 640px) {\n      width: 90%;\n    }\n  }\n"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var headerHeight = 72;
var defaultStyles = (0, _core.css)(_templateObject());
var headerMargin = (0, _core.css)(_templateObject2(), headerHeight);

var PageLayout = function PageLayout(_ref) {
  var header = _ref.header,
      heroTitle = _ref.heroTitle,
      heroSubtitle = _ref.heroSubtitle,
      teamTitle = _ref.teamTitle,
      children = _ref.children;
  return (0, _core.jsx)("div", {
    css: header && headerMargin
  }, header && (0, _core.jsx)(_Header["default"], null), heroTitle && (0, _core.jsx)(_CollectionHero["default"], {
    teamTitle: teamTitle,
    heroTitle: heroTitle,
    heroSubtitle: heroSubtitle
  }), (0, _core.jsx)("div", {
    css: defaultStyles
  }, children), (0, _core.jsx)(_FooterNew["default"], null));
};

PageLayout.displayName = "PageLayout";
PageLayout.propTypes = {
  header: _propTypes["default"].bool,
  teamTitle: _propTypes["default"].string,
  heroTitle: _propTypes["default"].string,
  heroSubtitle: _propTypes["default"].string,
  children: _propTypes["default"].node
};
PageLayout.defaultProps = {
  header: true
};
var _default = PageLayout;
exports["default"] = _default;