import { BreadcrumbTrail } from '../../../shared/kibana_chrome/generate_breadcrumbs' ; import { generateEncodedPath } from '../../utils/encode_path_params' ; import { ENGINES_TITLE } from '../engines' ; import { EngineLogic } from './' ; /**
 * Generate a path with engineName automatically filled from EngineLogic state
 */ export const generateEnginePath = ( path , pathParams = { } ) => { const { engineName } = EngineLogic . values ; return generateEncodedPath ( path , { engineName , ... pathParams } ) ; } ; /**
 * Generate a breadcrumb trail with engineName automatically filled from EngineLogic state
 */ export const getEngineBreadcrumbs = ( breadcrumbs = [ ] ) => { const { engineName } = EngineLogic . values ; return [ ENGINES_TITLE , engineName , ... breadcrumbs ] ; } ;