import React , { FC } from 'react' ; import { i18n } from '@kbn/i18n' ; import { EuiToolTip } from '@elastic/eui' ; import { createCapabilityFailureMessage } from '../../../../lib/authorization' ; export const cloneActionNameText = i18n . translate ( 'xpack.transform.transformList.cloneActionNameText' , { defaultMessage : 'Clone' , } ) ; interface CloneActionNameProps { disabled : boolean ; } export const CloneActionName = ( { disabled } ) => { if ( disabled ) { return ( < EuiToolTip position = "top" content = { createCapabilityFailureMessage ( 'canStartStopTransform' ) } > < > { cloneActionNameText } < /> < /EuiToolTip>); } return < > { cloneActionNameText } < />; } ;