import { AppMountParameters , AppNavLinkStatus , CoreSetup , CoreStart , Plugin , } from '../../../../src/core/public' ; import { PLUGIN_ID , PLUGIN_NAME , ReportingExampleLocatorDefinition } from '../common' ; import { SetupDeps , StartDeps , MyForwardableState } from './types' ; export class ReportingExamplePlugin implements Plugin < void , void , { } , { } > { public setup ( core , { developerExamples , screenshotMode , share } ) { core . application . register ( { id : PLUGIN_ID , title : PLUGIN_NAME , navLinkStatus : AppNavLinkStatus . hidden , async mount ( params ) { const { renderApp } = await import ( './application' ) ; const [ coreStart , depsStart ] = ( await core . getStartServices ( ) ) as [ CoreStart , StartDeps , unknown ] ; return renderApp ( coreStart , { ... depsStart , screenshotMode , share } , params , params . history . location . state as MyForwardableState ) ; } , } ) ; developerExamples . register ( { appId : 'reportingExample' , title : 'Reporting integration' , description : 'Demonstrate how to put an Export button on a page and generate reports.' , } ) ; share . url . locators . create ( new ReportingExampleLocatorDefinition ( ) ) ; } public start ( ) { } public stop ( ) { } }