import React from 'react';
import { IntlProvider } from 'react-intl';

/**
 * HOC to wrap component with IntlProvider if not available
 */
var withIntlProvider = function withIntlProvider(Component) {
  return function (props) {
    var content = /*#__PURE__*/React.createElement(Component, props);
    return props !== null && props !== void 0 && props.intl ? content : /*#__PURE__*/React.createElement(IntlProvider, {
      locale: "en"
    }, content);
  };
};
export default withIntlProvider;