import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import React from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import * as routerSelectors from '../../Router/selectors';
var externalLink = {
  target: '_blank',
  rel: 'noopener noreferrer'
};

var Footer =
/*#__PURE__*/
function (_React$PureComponent) {
  _inherits(Footer, _React$PureComponent);

  function Footer() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, Footer);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Footer)).call.apply(_getPrototypeOf2, [this].concat(args)));

    _this.getCopyRight = function () {
      return "Copyright \xA9 ".concat(new Date().getFullYear());
    };

    return _this;
  }

  _createClass(Footer, [{
    key: "render",
    value: function render() {
      var contactLink = this.props.contactLink;
      return React.createElement(React.Fragment, null, React.createElement("footer", {
        id: "footer",
        className: "global-footer"
      }, React.createElement("div", {
        className: "container"
      }, React.createElement("div", {
        className: "row"
      }, React.createElement("div", {
        className: "three-quarters"
      }, React.createElement("ul", {
        className: "footer-links"
      }, React.createElement("li", null, React.createElement("a", {
        href: "#skip-to-content"
      }, "Back to Top")), React.createElement("li", null, React.createElement("a", Object.assign({
        href: "http://www.ca.gov/Use"
      }, externalLink), "Conditions of Use")), React.createElement("li", null, React.createElement("a", Object.assign({
        href: "http://www.ca.gov/Privacy"
      }, externalLink), "Privacy Policy")), React.createElement("li", null, React.createElement("a", Object.assign({
        href: "http://www.ca.gov/Accessibility"
      }, externalLink), "Accessibility")), React.createElement("li", null, React.createElement(Link, {
        to: contactLink
      }, "Contact Us")))), React.createElement("div", {
        className: "quarter text-right"
      }, React.createElement("ul", {
        className: "socialsharer-container"
      }, React.createElement("li", null, React.createElement("a", {
        href: "https://www.flickr.com/groups/californiagovernment"
      }, React.createElement("span", {
        className: "ca-gov-icon-flickr",
        "aria-hidden": "true"
      }), React.createElement("span", {
        className: "sr-only"
      }, "Flickr"))), React.createElement("li", null, React.createElement("a", {
        href: "https://www.pinterest.com/cagovernment/"
      }, React.createElement("span", {
        className: "ca-gov-icon-pinterest",
        "aria-hidden": "true"
      }), React.createElement("span", {
        className: "sr-only"
      }, "Pinterest"))), React.createElement("li", null, React.createElement("a", {
        href: "https://twitter.com/cagovernment"
      }, React.createElement("span", {
        className: "ca-gov-icon-twitter",
        "aria-hidden": "true"
      }), React.createElement("span", {
        className: "sr-only"
      }, "Twitter"))), React.createElement("li", null, React.createElement("a", {
        href: "https://www.youtube.com/user/californiagovernment"
      }, React.createElement("span", {
        className: "ca-gov-icon-youtube",
        "aria-hidden": "true"
      }), React.createElement("span", {
        className: "sr-only"
      }, "YouTube"))))))), React.createElement("div", {
        className: "copyright"
      }, React.createElement("div", {
        className: "container"
      }, this.getCopyRight()))), React.createElement("div", {
        className: "decoration-last"
      }, "\xA0"));
    }
  }]);

  return Footer;
}(React.PureComponent);

export var mapStateToProps = createStructuredSelector({
  contactLink: routerSelectors.getContactLink()
});
var withRedux = connect(mapStateToProps);
export default withRedux(Footer);