import { schema , TypeOf } from '@osd/config-schema' ; import { ConfigDeprecationProvider } from 'packages/osd-config' ; export type OpenSearchDashboardsConfigType = TypeOf < typeof config . schema > ; const deprecations = ( { renameFromRoot } ) => [ renameFromRoot ( 'kibana.enabled' , 'opensearchDashboards.enabled' ) , renameFromRoot ( 'kibana.index' , 'opensearchDashboards.index' ) , renameFromRoot ( 'kibana.autocompleteTerminateAfter' , 'opensearchDashboards.autocompleteTerminateAfter' ) , renameFromRoot ( 'kibana.autocompleteTimeout' , 'opensearchDashboards.autocompleteTimeout' ) , ] ; export const config = { path : 'opensearchDashboards' , schema : schema . object ( { enabled : schema . boolean ( { defaultValue : true } ) , index : schema . string ( { defaultValue : '.kibana' } ) , autocompleteTerminateAfter : schema . duration ( { defaultValue : 100000 } ) , autocompleteTimeout : schema . duration ( { defaultValue : 1000 } ) , branding : schema . object ( { logo : schema . object ( { defaultUrl : schema . string ( { defaultValue : '/' , } ) , darkModeUrl : schema . string ( { defaultValue : '/' , } ) , } ) , mark : schema . object ( { defaultUrl : schema . string ( { defaultValue : '/' , } ) , darkModeUrl : schema . string ( { defaultValue : '/' , } ) , } ) , loadingLogo : schema . object ( { defaultUrl : schema . string ( { defaultValue : '/' , } ) , darkModeUrl : schema . string ( { defaultValue : '/' , } ) , } ) , faviconUrl : schema . string ( { defaultValue : '/' , } ) , applicationTitle : schema . string ( { defaultValue : '' , } ) , } ) , } ) , deprecations , } ;