import { i18n } from '@osd/i18n' ; import { $Values } from '@osd/utility-types' ; export const AggGroupNames = Object . freeze ( { Buckets : 'buckets' as 'buckets' , Metrics : 'metrics' as 'metrics' , None : 'none' as 'none' , } ) ; export type AggGroupName = $Values < typeof AggGroupNames > ; export const AggGroupLabels = { [ AggGroupNames . Buckets ] : i18n . translate ( 'data.search.aggs.aggGroups.bucketsText' , { defaultMessage : 'Buckets' , } ) , [ AggGroupNames . Metrics ] : i18n . translate ( 'data.search.aggs.aggGroups.metricsText' , { defaultMessage : 'Metrics' , } ) , [ AggGroupNames . None ] : i18n . translate ( 'data.search.aggs.aggGroups.noneText' , { defaultMessage : 'None' , } ) , } ;