import * as ReactDOM from 'react-dom';
import { canUseDOM } from '.';
import { getMountContainer } from './getMountContainer';
export function renderToContainer(mountContainer, node) {
  if (canUseDOM && mountContainer) {
    var container = getMountContainer(mountContainer);
    return /*#__PURE__*/ReactDOM.createPortal(node, container);
  }

  return node;
}