import React , { FC } from 'react' ; import { i18n } from '@kbn/i18n' ; import { EuiToolTip } from '@elastic/eui' ; export const editActionNameText = i18n . translate ( 'xpack.ml.dataframe.analyticsList.editActionNameText' , { defaultMessage : 'Edit' , } ) ; interface EditActionNameProps { isDisabled : boolean ; } export const EditActionName = ( { isDisabled } ) => { if ( isDisabled ) { return ( < EuiToolTip position = "top" content = { i18n . translate ( 'xpack.ml.dataframe.analyticsList.editActionPermissionTooltip' , { defaultMessage : 'You do not have permission to edit analytics jobs.' , } ) } > < > { editActionNameText } < /> < /EuiToolTip>); } return < > { editActionNameText } < />; } ;