import { ThemeSettings } from '@ulangi/ulangi-common/interfaces' ; import { ObservableUserStore } from '@ulangi/ulangi-observable' ; import { config } from '../../constants/config' ; export class ThemeSettingsDelegate { private userStore : ObservableUserStore ; public constructor ( userStore ) { this . userStore = userStore ; } public getCurrentSettings ( ) { if ( this . userStore . currentUser === null || typeof this . userStore . currentUser . themeSettings === 'undefined' ) { return config . user . defaultThemeSettings ; } else { return this . userStore . currentUser . themeSettings ; } } }