import { Plugin , CoreStart , CoreSetup , AppMountParameters } from 'kibana/public' ; import { i18n } from '@kbn/i18n' ; import { TimelinesUIStart } from '../../../../../plugins/timelines/public' ; import { renderApp } from './applications/timelines_test' ; import { DataPublicPluginStart } from '../../../../../../src/plugins/data/public' ; export type TimelinesTestPluginSetup = void ; export type TimelinesTestPluginStart = void ; export interface TimelinesTestPluginSetupDependencies { } export interface TimelinesTestPluginStartDependencies { timelines : TimelinesUIStart ; data : DataPublicPluginStart ; } export class TimelinesTestPlugin implements Plugin < TimelinesTestPluginSetup , void , TimelinesTestPluginSetupDependencies , TimelinesTestPluginStartDependencies > { private timelinesPlugin : TimelinesUIStart | null = null ; public setup ( core , setupDependencies ) { core . application . register ( { id : 'timelinesTest' , title : i18n . translate ( 'xpack.timelinesTest.pluginTitle' , { defaultMessage : 'Timelines Test' , } ) , mount : async ( params ) => { const startServices = await core . getStartServices ( ) ; const [ coreStart , { data } ] = startServices ; return renderApp ( { ... coreStart , data } , params , this . timelinesPlugin ) ; } , } ) ; } public start ( core , { timelines } ) { this . timelinesPlugin = timelines ; } }