"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
/**
 * HOC to wrap component with IntlProvider if not available
 */
var withIntlProvider = function withIntlProvider(Component) {
  return function (props) {
    var content = /*#__PURE__*/_react.default.createElement(Component, props);
    return props !== null && props !== void 0 && props.intl ? content : /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, content);
  };
};
var _default = exports.default = withIntlProvider;