import React from 'react';
import { RawIntlProvider } from 'react-intl';
import { isSSR } from '../core-utils/is-ssr';
import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
export function ExtensionSSRReactContextsProvider(_ref) {
  var children = _ref.children,
    intl = _ref.intl;
  if (!isSSR() || !isSSRStreaming()) {
    return children;
  }
  if (!intl) {
    return children;
  }
  return /*#__PURE__*/React.createElement(RawIntlProvider, {
    value: intl
  }, children);
}