import { IBasePath } from '../../../../../../../src/core/public' ; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context' ; export function getUpgradeAssistantHref ( basePath ) { return basePath . prepend ( '/app/management/stack/upgrade_assistant' ) ; } export function useUpgradeAssistantHref ( ) { const { core } = useApmPluginContext ( ) ; return getUpgradeAssistantHref ( core . http . basePath ) ; } export function useFleetCloudAgentPolicyHref ( ) { const { core : { http : { basePath } , } , } = useApmPluginContext ( ) ; return basePath . prepend ( '/app/fleet#/policies/policy-elastic-agent-on-cloud' ) ; } export function useUpgradeApmPackagePolicyHref ( packagePolicyId = '' ) { const { core : { http : { basePath } , } , } = useApmPluginContext ( ) ; return basePath . prepend ( `/app/fleet/policies/policy-elastic-agent-on-cloud/upgrade-package-policy/${ packagePolicyId }?from=integrations-policy-list` ) ; }