import type { SerializableRecord } from '@kbn/utility-types' ; import { EnhancementRegistryDefinition } from '../../../../../src/plugins/embeddable/public' ; import { SavedObjectReference } from '../../../../../src/core/types' ; import { DynamicActionsState } from '../../../ui_actions_enhanced/public' ; import { UiActionsServiceEnhancements } from '../services' ; export const dynamicActionEnhancement = ( uiActionsEnhanced ) : EnhancementRegistryDefinition => { return { id : 'dynamicActions' , telemetry : ( state , telemetryData ) => { return uiActionsEnhanced . telemetry ( state as DynamicActionsState , telemetryData ) ; } , extract : ( state ) => { return uiActionsEnhanced . extract ( state as DynamicActionsState ) ; } , inject : ( state , references ) => { return uiActionsEnhanced . inject ( state as DynamicActionsState , references ) ; } , } as EnhancementRegistryDefinition < SerializableRecord > ; } ;