import React from 'react' ; import { EuiButton , EuiText , EuiSpacer } from '@elastic/eui' ; import { i18n } from '@kbn/i18n' ; import { AgentEnrollmentFlyoutFinalStepExtension } from '../../../../fleet/public' ; import { useKibana } from '../../../../../../src/plugins/kibana_react/public' ; import { ApmPluginStartDeps } from '../../plugin' ; function StepComponent ( ) { const { http } = useKibana < ApmPluginStartDeps > ( ) . services ; const installApmAgentLink = http ?. basePath . prepend ( '/app/home#/tutorial/apm' ) ; return ( < > < EuiText > < p > { i18n . translate ( 'xpack.apm.fleetIntegration.enrollmentFlyout.installApmAgentDescription' , { defaultMessage : 'After the agent starts, you can install APM agents on your hosts to collect data from your applications and services.' , } ) } < /p> < /EuiText> < EuiSpacer size = "m" / > < EuiButton fill href = { installApmAgentLink } > { i18n . translate ( 'xpack.apm.fleetIntegration.enrollmentFlyout.installApmAgentButtonText' , { defaultMessage : 'Install APM Agent' } ) } < /EuiButton> < />); } export function getApmEnrollmentFlyoutData ( ) { return { title : i18n . translate ( 'xpack.apm.fleetIntegration.enrollmentFlyout.installApmAgentTitle' , { defaultMessage : 'Install APM Agent' , } ) , Component : StepComponent , } ; }