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