import { PluginInitializerContext , CoreStart , CoreSetup } from 'opensearch-dashboards/public' ; import { ConfigSchema } from '../config' ; import { getDashboardConfig } from './dashboard_config' ; import { injectHeaderStyle } from './utils/inject_header_style' ; export class OpenSearchDashboardsLegacyPlugin { constructor ( private readonly initializerContext ) { } public setup ( core ) { return { } ; } public start ( { application , http : { basePath } , uiSettings } ) { injectHeaderStyle ( uiSettings ) ; return { deprecated dashboardConfig : getDashboardConfig ( ! application . capabilities . dashboard . showWriteControls ) , deprecated loadFontAwesome : async ( ) => { await import ( './font_awesome' ) ; } , deprecated config : this . initializerContext . config . get ( ) , } ; } } export type OpenSearchDashboardsLegacySetup = ReturnType < OpenSearchDashboardsLegacyPlugin [ 'setup' ] > ; export type OpenSearchDashboardsLegacyStart = ReturnType < OpenSearchDashboardsLegacyPlugin [ 'start' ] > ;