"use strict";

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

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

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

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

function _templateObject2() {
  var data = _taggedTemplateLiteral(["\n  display: block;\n  font-family: \"Roboto Condensed\", \"Helvetica Neue\", Helvetica, sans-serif;\n  font-size: 14px;\n  text-align: center;\n  margin: 10px 0;\n\n  @media (max-width: 640px) {\n    text-align: left;\n  }\n"]);

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

  return data;
}

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  display: block;\n  font-family: \"Roboto Condensed\", \"Helvetica Neue\", Helvetica, sans-serif;\n  font-size: 21px;\n  font-weight: bold;\n  text-align: center;\n  margin: 0;\n\n  @media (max-width: 640px) {\n    text-align: left;\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 titleStyle = (0, _core.css)(_templateObject());
var subtitleStyle = (0, _core.css)(_templateObject2());

var ChartTitle = function ChartTitle(_ref) {
  var title = _ref.title,
      subtitle = _ref.subtitle;
  return title || subtitle ? (0, _core.jsx)("figcaption", null, title ? (0, _core.jsx)("h2", {
    css: titleStyle
  }, title) : null, subtitle ? (0, _core.jsx)("h3", {
    css: subtitleStyle
  }, subtitle) : null) : null;
};

ChartTitle.propTypes = {
  title: _propTypes["default"].string,
  subtitle: _propTypes["default"].string
};
ChartTitle.defaultProps = {};
var _default = ChartTitle;
exports["default"] = _default;