import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/inherits";
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(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; })(); }
import React from 'react';
import { injectIntl, IntlProvider } from 'react-intl';
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
import { context } from '../../utils/analytics';
import { CardWithURLRenderer } from '../CardWithUrl/loader';
var PlainCard = /*#__PURE__*/function (_React$PureComponent) {
  function PlainCard() {
    _classCallCheck(this, PlainCard);
    return _callSuper(this, PlainCard, arguments);
  }
  _inherits(PlainCard, _React$PureComponent);
  return _createClass(PlainCard, [{
    key: "render",
    value: function render() {
      var content = /*#__PURE__*/React.createElement(CardWithURLRenderer, this.props);
      return this.props.intl ? content : /*#__PURE__*/React.createElement(IntlProvider, {
        locale: "en"
      }, content);
    }
  }]);
}(React.PureComponent);
export var Card = withAnalyticsContext(context)(withAnalyticsEvents()(injectIntl(PlainCard, {
  enforceContext: false
})));