import { ChartsPluginSetup } from '../../../charts/public' ; import { CoreSetup , CoreStart } from '../../../../core/public' ; import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public' ; import { gaugeFunction } from '../common' ; import { setFormatService , setThemeService } from './services' ; import { gaugeRenderer } from './expression_renderers' ; import type { FieldFormatsStart } from '../../../field_formats/public' ; internal export interface ExpressionGaugePluginSetup { expressions : ReturnType < ExpressionsPublicPlugin [ 'setup' ] > ; charts : ChartsPluginSetup ; } internal export interface ExpressionGaugePluginStart { fieldFormats : FieldFormatsStart ; } internal export class ExpressionGaugePlugin { public setup ( core , { expressions , charts } ) { setThemeService ( charts . theme ) ; expressions . registerFunction ( gaugeFunction ) ; expressions . registerRenderer ( gaugeRenderer ( { theme : core . theme } ) ) ; } public start ( core , { fieldFormats } ) { setFormatService ( fieldFormats ) ; } }