import { EuiBadge } from '@elastic/eui' ; import { i18n } from '@kbn/i18n' ; import React from 'react' ; export interface SyncBadgeProps { /**
     * Is the request synchronous? True will show blocking, false will show async.
     */ sync ? : boolean ; } export function SyncBadge ( { sync } ) { switch ( sync ) { case true : return ( < EuiBadge > { i18n . translate ( 'xpack.apm.transactionDetails.syncBadgeBlocking' , { defaultMessage : 'blocking' , } ) } < /EuiBadge>); case false : return ( < EuiBadge > { i18n . translate ( 'xpack.apm.transactionDetails.syncBadgeAsync' , { defaultMessage : 'async' , } ) } < /EuiBadge>); default : return null ; } }