"use strict";

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

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

var _reactRouter = require("react-router");

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

var _uiBrand = require("@hackoregon/ui-brand");

var _ScrollToTop = _interopRequireDefault(require("../ScrollToTop/ScrollToTop"));

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

function _templateObject5() {
  var data = _taggedTemplateLiteral(["\n  color: #EE495C;\n  ", "\n  margin: ", ";\n\n  & > div {\n    margin-left: auto;\n  }\n\n  @media (min-width: 758px) {\n    margin-left: 0;\n  }\n"]);

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

  return data;
}

function _templateObject4() {
  var data = _taggedTemplateLiteral(["\n  margin: 0 auto;\n  border-bottom: none;\n"]);

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

  return data;
}

function _templateObject3() {
  var data = _taggedTemplateLiteral(["\n  flex: 2 auto;\n  display: flex;\n  align-items: center;\n  height: auto;\n\n  & > img {\n    flex: 1;\n    padding: 12px;\n  }\n"]);

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

  return data;
}

function _templateObject2() {
  var data = _taggedTemplateLiteral(["\n  color: #726371;\n  ", "\n  margin: ", ";\n"]);

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

  return data;
}

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  width: 100%;\n  background: #fff;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  align-content: center;\n  flex-direction: row;\n  margin-left: 0;\n  margin-top: 200px;\n  padding: 32px 40px;\n  position: relative;\n  box-sizing: border-box;\n  border-top: 1px solid lightgrey;\n\n  @media (min-width: 768px) {\n    margin-left: 0;\n  }\n\n  @media (max-width: 850px) {\n    padding: 32px 20px;\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 commonFont = "\n  font-family: 'Rubik';\n  font-weight: 500;\n";
var commonMargin = "12px 8px";
var footerClass = (0, _core.css)(_templateObject());
var copyrightClass = (0, _core.css)(_templateObject2(), commonFont, commonMargin);
var logoClass = (0, _core.css)(_templateObject3());
var logoLinkStyle = (0, _core.css)(_templateObject4());
var scrollToTopClass = (0, _core.css)(_templateObject5(), commonFont, commonMargin);
var defaultAttribution = "\xA9 Copyright ".concat(new Date().getFullYear());

var Footer = function Footer(_ref) {
  var attribution = _ref.attribution;
  return (0, _core.jsx)("footer", {
    css: footerClass
  }, (0, _core.jsx)("div", {
    css: copyrightClass
  }, attribution), (0, _core.jsx)("div", {
    css: logoClass
  }, (0, _core.jsx)(_reactRouter.Link, {
    to: "/",
    alt: "civic homepage",
    css: logoLinkStyle
  }, (0, _core.jsx)(_uiBrand.Logo, {
    type: "standardLogo"
  }))), (0, _core.jsx)("div", {
    css: scrollToTopClass
  }, (0, _core.jsx)(_ScrollToTop["default"], {
    iconStyle: "fa fa-angle-up"
  })));
};

Footer.displayName = "Footer";
Footer.defaultProps = {
  attribution: defaultAttribution
};
Footer.propTypes = {
  attribution: _propTypes["default"].node
};
var _default = Footer;
exports["default"] = _default;