UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

38 lines 1.58 kB
import { Observable } from 'rxjs'; import { OptionsService } from '../common/options.service'; import * as i0 from "@angular/core"; export type ThemeOptions = 'light' | 'dark'; export type ThemePreferenceOptions = ThemeOptions | 'system'; export declare class ThemeSwitcherService { private options; darkThemeClass: string; darkThemeAvailable$: Observable<boolean>; userSelectedThemePreference$: Observable<ThemePreferenceOptions>; currentlyAppliedTheme$: Observable<ThemeOptions>; disableThemeSelection$: Observable<boolean>; themeOptions: [{ readonly label: "Light"; readonly value: "light"; readonly icon: "sun"; }, { readonly label: "Dark"; readonly value: "dark"; readonly icon: "moon"; }, { readonly label: "System"; readonly value: "system"; readonly icon: "imac-settings"; }]; private _userSelectedThemePreference$; private _temporaryThemePreference$; constructor(options: OptionsService); getCurrentThemePreference(): 'light' | 'dark' | 'system'; getUsersSystemPreferenceForTheme$(): Observable<"light" | "dark">; changeUserPreference(preference: 'light' | 'dark' | 'system'): void; temporaryChangeTheme(preference: 'light' | 'dark'): void; resetTemporaryTheme(): void; applyTheme(preference: 'light' | 'dark' | 'system'): void; static ɵfac: i0.ɵɵFactoryDeclaration<ThemeSwitcherService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ThemeSwitcherService>; } //# sourceMappingURL=theme-switcher.service.d.ts.map