"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ExtensionSSRReactContextsProvider = ExtensionSSRReactContextsProvider;
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
var _isSsr = require("../core-utils/is-ssr");
function ExtensionSSRReactContextsProvider(_ref) {
  var children = _ref.children,
    intl = _ref.intl;
  if (!(0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true) || !(0, _isSsr.isSSR)()) {
    return children;
  }
  if (!intl) {
    return children;
  }
  return /*#__PURE__*/_react.default.createElement(_reactIntl.RawIntlProvider, {
    value: intl
  }, children);
}