import { CoreSetup } from 'src/core/public' ; import { ManagementAppMountParams } from 'src/plugins/management/public' ; import { i18n } from '@kbn/i18n' ; import { ClientConfigType } from '../types' ; import { httpService } from './services/http' ; import { UiMetricService } from './services' ; import { breadcrumbService , docTitleService } from './services/navigation' ; import { AppDependencies } from './app_context' ; import { renderApp } from '.' ; export async function mountManagementSection ( coreSetup , services , config , params ) { const { element , setBreadcrumbs , history , theme$ } = params ; const [ core ] = await coreSetup . getStartServices ( ) ; const { chrome : { docTitle } , } = core ; docTitleService . setup ( docTitle . change ) ; breadcrumbService . setup ( setBreadcrumbs ) ; const appDependencies = { core , config , services : { httpService , uiMetricService : services . uiMetricService , i18n , history , } , theme$ , } ; const unmountAppCallback = renderApp ( element , appDependencies ) ; return ( ) => { docTitle . reset ( ) ; unmountAppCallback ( ) ; } ; }