"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Card = 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 = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _analyticsNext = require("@atlaskit/analytics-next");
var _analytics = require("../../utils/analytics");
var _loader = require("../CardWithUrl/loader");
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
var PlainCard = /*#__PURE__*/function (_React$PureComponent) {
  function PlainCard() {
    (0, _classCallCheck2.default)(this, PlainCard);
    return _callSuper(this, PlainCard, arguments);
  }
  (0, _inherits2.default)(PlainCard, _React$PureComponent);
  return (0, _createClass2.default)(PlainCard, [{
    key: "render",
    value: function render() {
      var content = /*#__PURE__*/_react.default.createElement(_loader.CardWithURLRenderer, this.props);
      return this.props.intl ? content : /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
        locale: "en"
      }, content);
    }
  }]);
}(_react.default.PureComponent);
var Card = exports.Card = (0, _analyticsNext.withAnalyticsContext)(_analytics.context)((0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntl.injectIntl)(PlainCard, {
  enforceContext: false
})));