import React, { useContext } from 'react';
import { IntlContext, IntlProvider } from 'react-intl';
var useCheckIntlContext = function useCheckIntlContext() {
  return useContext(IntlContext) === null;
};
export default function IntlProviderIfMissingWrapper(_ref) {
  var children = _ref.children;
  var missingIntlContext = useCheckIntlContext();
  if (missingIntlContext) {
    return /*#__PURE__*/React.createElement(IntlProvider, {
      locale: "en"
    }, children);
  }
  return children;
}