import { i18n } from '@kbn/i18n' ; import { ActionGroup } from './rule_type' ; export type DefaultActionGroupId = 'default' ; export type RecoveredActionGroupId = typeof RecoveredActionGroup [ 'id' ] ; export const RecoveredActionGroup = Object . freeze ( { id : 'recovered' , name : i18n . translate ( 'xpack.alerting.builtinActionGroups.recovered' , { defaultMessage : 'Recovered' , } ) , } ) ; export type ReservedActionGroups < RecoveryActionGroupId extends string > = RecoveryActionGroupId | RecoveredActionGroupId ; export type WithoutReservedActionGroups < ActionGroupIds extends string , RecoveryActionGroupId extends string > = ActionGroupIds extends ReservedActionGroups < RecoveryActionGroupId > ? never : ActionGroupIds ; export function getBuiltinActionGroups < RecoveryActionGroupId extends string > ( customRecoveryGroup ? ) { return [ customRecoveryGroup ?? RecoveredActionGroup ] ; }