import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm' ; import UiSharedDepsSrc from '@kbn/ui-shared-deps-src' ; import { PublicUiSettingsParams , UserProvidedValues } from '../ui_settings' ; export const getSettingValue = < T > ( settingName , settings , convert ) : T => { const value = settings . user ?. [ settingName ] ?. userValue ?? settings . defaults [ settingName ] . value ; return convert ( value ) ; } ; export const getStylesheetPaths = ( { themeVersion , darkMode , basePath , buildNum , } ) => { const regularBundlePath = `${ basePath }/${ buildNum }/bundles` ; return [ ... ( darkMode ? [ `${ regularBundlePath }/kbn-ui-shared-deps-npm/${ UiSharedDepsNpm . darkCssDistFilename ( themeVersion ) }` , `${ regularBundlePath }/kbn-ui-shared-deps-src/${ UiSharedDepsSrc . cssDistFilename }` , `${ basePath }/node_modules/@kbn/ui-framework/dist/kui_dark.css` , `${ basePath }/ui/legacy_dark_theme.css` , ] : [ `${ regularBundlePath }/kbn-ui-shared-deps-npm/${ UiSharedDepsNpm . lightCssDistFilename ( themeVersion ) }` , `${ regularBundlePath }/kbn-ui-shared-deps-src/${ UiSharedDepsSrc . cssDistFilename }` , `${ basePath }/node_modules/@kbn/ui-framework/dist/kui_light.css` , `${ basePath }/ui/legacy_light_theme.css` , ] ) , ] ; } ;