import React from 'react' ; import { render , unmountComponentAtNode } from 'react-dom' ; import { Observable } from 'rxjs' ; import { I18nStart , ScopedHistory , ApplicationStart , UnmountCallback , CoreTheme , } from 'src/core/public' ; import { DocLinksStart } from 'kibana/public' ; import { CloudSetup , ILicense , KibanaContextProvider , APP_WRAPPER_CLASS , RedirectAppLinks , KibanaThemeProvider , } from '../shared_imports' ; import { App } from './app' ; import { BreadcrumbService } from './services/breadcrumbs' ; export const renderApp = ( element , I18nContext , history , application , breadcrumbService , license , theme$ , docLinks , cloud ? ) : UnmountCallback => { const { getUrlForApp } = application ; render ( < RedirectAppLinks application = { application } className = { APP_WRAPPER_CLASS } > < I18nContext > < KibanaThemeProvider theme$ = { theme$ } > < KibanaContextProvider services = { { cloud , breadcrumbService , license , getUrlForApp , docLinks } } > < App history = { history } /> < /KibanaContextProvider> < /KibanaThemeProvider> < /I18nContext> < /RedirectAppLinks>, element); return ( ) => unmountComponentAtNode ( element ) ; } ;