1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 18:43:26 +00:00
Files
browser/libs/angular/src/platform/services/theming/theming.service.abstraction.ts
Jonathan Prusik eba1212e1c [PM-14351] Migrate away from theme enum (#11812)
* update extension autofill concerns to use theme object and type over enum

* mark ThemeType enum as deprecated

* update theming service concerns to use theme object and type over enum
2024-10-31 16:46:25 -04:00

23 lines
825 B
TypeScript

import { Observable, Subscription } from "rxjs";
import { Theme } from "@bitwarden/common/platform/enums";
/**
* A service for managing and observing the current application theme.
*/
// FIXME: Rename to ThemingService
export abstract class AbstractThemingService {
/**
* The effective theme based on the user configured choice and the current system theme if
* the configured choice is {@link ThemeTypes.System}.
*/
abstract theme$: Observable<Theme>;
/**
* Listens for effective theme changes and applies changes to the provided document.
* @param document The document that should have theme classes applied to it.
*
* @returns A subscription that can be unsubscribed from to cancel the application of theme classes.
*/
abstract applyThemeChangesTo(document: Document): Subscription;
}