import { SSR } from './SSR' ; import { createElement } from './createElement' ; export function createPortalOutlet ( id ) { if ( SSR ) return null ; return document . getElementById ( id ) ?? makePortal ( id ) ; } function makePortal ( id ) { if ( SSR ) return null ; const portal = createElement ( 'div' , { id } ) ; document . body . appendChild ( portal ) ; return portal ; }