'use strict';

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

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _dec, _class, _class2, _temp;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

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

var _Link2 = _interopRequireDefault(_Link);

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

var _Text2 = _interopRequireDefault(_Text);

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

var _lib2 = _interopRequireDefault(_lib);

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

var _Card2 = _interopRequireDefault(_Card);

var _theme = require('./theme');

var _theme2 = _interopRequireDefault(_theme);

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

var styles = {
  template: function template(theme) {
    return '/*  imported from styles.css  */\n\n.ReportCard__styles__card {\n  height: ' + theme.cardHeight + ';\n  width: ' + theme.cardWidth + ';\n  padding: ' + theme.cardPadding + ';\n  margin: ' + theme.cardMargin + ';\n  display: inline-flex;\n  flex-direction: column;\n  box-shadow: ' + theme.cardBoxShadow + ';\n  border-radius: ' + theme.cardBorderRadius + ';\n}\n\n.ReportCard__styles__details {\n  padding-top: ' + theme.detailPadding + ';\n}\n';
  },
  'card': 'ReportCard__styles__card',
  'details': 'ReportCard__styles__details'
};
var ReportCard = (_dec = (0, _lib2.default)(_theme2.default, styles), _dec(_class = (_temp = _class2 = function (_Component) {
  (0, _inherits3.default)(ReportCard, _Component);

  function ReportCard() {
    (0, _classCallCheck3.default)(this, ReportCard);
    return (0, _possibleConstructorReturn3.default)(this, (ReportCard.__proto__ || Object.getPrototypeOf(ReportCard)).apply(this, arguments));
  }

  (0, _createClass3.default)(ReportCard, [{
    key: 'render',
    value: function render() {
      var _props = this.props,
          name = _props.name,
          details = _props.details,
          href = _props.href;

      return _react2.default.createElement(
        _Card2.default,
        { className: styles.card },
        _react2.default.createElement(
          _Link2.default,
          { href: href },
          _react2.default.createElement(
            _Text2.default,
            { size: 'medium', weight: 'bold' },
            name
          )
        ),
        _react2.default.createElement(
          'div',
          { className: styles.details },
          _react2.default.createElement(
            _Text2.default,
            { size: 'small', color: 'secondary' },
            details
          )
        )
      );
    }
  }]);
  ReportCard.displayName = 'ReportCard'
  ;
  return ReportCard;
}(_react.Component), _class2.propTypes = {
  name: _propTypes2.default.node,
  details: _propTypes2.default.node,
  href: _propTypes2.default.string
}, _temp)) || _class);
exports.default = ReportCard;