import { schema } from '@kbn/config-schema' ; import { i18n } from '@kbn/i18n' ; import { isRelativeUrl } from '@kbn/std' ; import { UiSettingsParams } from '../../../types' ; export const getNavigationSettings = ( ) : Record < string , UiSettingsParams > => { return { defaultRoute : { name : i18n . translate ( 'core.ui_settings.params.defaultRoute.defaultRouteTitle' , { defaultMessage : 'Default route' , } ) , value : '/app/home' , schema : schema . string ( { validate ( value ) { if ( ! value . startsWith ( '/' ) || ! isRelativeUrl ( value ) ) { return i18n . translate ( 'core.ui_settings.params.defaultRoute.defaultRouteIsRelativeValidationMessage' , { defaultMessage : 'Must be a relative URL.' , } ) ; } } , } ) , description : i18n . translate ( 'core.ui_settings.params.defaultRoute.defaultRouteText' , { defaultMessage : 'This setting specifies the default route when opening Kibana. ' + 'You can use this setting to modify the landing page when opening Kibana. ' + 'The route must be a relative URL.' , } ) , } , } ; } ;