"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));

var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));

var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

var _react = _interopRequireWildcard(require("react"));

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

var _Link = _interopRequireDefault(require("@instructure/ui-elements/lib/components/Link"));

var _Text = _interopRequireDefault(require("@instructure/ui-elements/lib/components/Text"));

var _lib = _interopRequireDefault(require("@instructure/ui-themeable/lib"));

var _Card = _interopRequireDefault(require("../../../../common/components/shared/Card"));

var _theme = _interopRequireDefault(require("./theme"));

var _dec, _class, _class2, _temp;

var styles = {
  componentId: 'eRzKS',
  template: function template(theme) {
    return "\n\n.ReportCard__styles__card{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.ReportCard__styles__details{padding-top:").concat(theme.detailPadding || 'inherit', "}");
  },
  'card': 'ReportCard__styles__card',
  'details': 'ReportCard__styles__details'
};
var ReportCard = (_dec = (0, _lib.default)(_theme.default, styles), _dec(_class = (_temp = _class2 =
/*#__PURE__*/
function (_Component) {
  (0, _inherits2.default)(ReportCard, _Component);

  function ReportCard() {
    (0, _classCallCheck2.default)(this, ReportCard);
    return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ReportCard).apply(this, arguments));
  }

  (0, _createClass2.default)(ReportCard, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          name = _this$props.name,
          details = _this$props.details,
          href = _this$props.href;
      return _react.default.createElement(_Card.default, {
        className: styles.card
      }, _react.default.createElement(_Link.default, {
        href: href
      }, _react.default.createElement(_Text.default, {
        size: "medium",
        weight: "bold"
      }, name)), _react.default.createElement("div", {
        className: styles.details
      }, _react.default.createElement(_Text.default, {
        size: "small",
        color: "secondary"
      }, details)));
    }
  }]);
  ReportCard.displayName = "ReportCard";
  return ReportCard;
}(_react.Component), _class2.propTypes = {
  name: _propTypes.default.node,
  details: _propTypes.default.node,
  href: _propTypes.default.string
}, _temp)) || _class);
exports.default = ReportCard;