import * as i0 from '@angular/core'; import { InjectionToken, OnDestroy } from '@angular/core'; interface ThemingConfig { defaultTheme: string; } declare const UI5_THEMING_CONFIGURATION: InjectionToken; interface Ui5ThemingProvider { name: string; getAvailableThemes(): string[] | Promise; supportsTheme(themeName: string): boolean | Promise; setTheme(themeName: string): Promise; } interface Ui5ThemingConsumer extends Omit { registerProvider(provider: Ui5ThemingProvider): void; unregisterProvider(provider: Ui5ThemingProvider): void; } declare class Ui5ThemingService implements Ui5ThemingConsumer { readonly availableThemes: i0.Signal; private readonly _config; private readonly _providers; private readonly _currentTheme; constructor(); getAvailableThemes(): string[]; supportsTheme(themeName: string): Promise; registerProvider(provider: Ui5ThemingProvider): void; unregisterProvider(provider: Ui5ThemingProvider): void; setTheme(theme: string): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @description * Abstract base class for UI5 Web Components theming providers. * * Components extending this class are responsible for providing the necessary theme resources * (via the `registerThemes` callback) and exposing the supported themes. It integrates * with the global {@link Ui5ThemingService} to make its themes available application-wide. * * @implements {Ui5ThemingProvider} * @implements {OnDestroy} */ declare abstract class WebcomponentsThemingProvider implements Ui5ThemingProvider, OnDestroy { protected registerThemes: () => Promise; /** * @description * The unique name for this theming provider, which must be implemented by subclasses. * This is used by the global {@link Ui5ThemingService} for registration and identification. */ abstract name: string; /** * @description * A signal containing the list of themes supported by this provider. * It is initialized with the themes loaded from the `supported-themes` file. */ protected availableThemes: i0.WritableSignal; /** * @description * Reference to the global {@link Ui5ThemingService}, injected optionally. * The provider registers itself here if the global service is available. */ protected _globalThemingService: Ui5ThemingService | null; /** @hidden */ protected constructor(registerThemes: () => Promise); /** @hidden */ ngOnDestroy(): void; /** * @description * Checks if a specific theme name is supported by this provider. * @param theme The name of the theme to check (e.g., 'sap_horizon'). * @returns `true` if the theme is supported, `false` otherwise. */ supportsTheme(theme: string): boolean | Promise; /** * @description * Retrieves the list of theme names supported by this provider. * @returns An array of supported theme names. */ getAvailableThemes(): string[] | Promise; /** * @description * Attempts to set the given theme globally for all UI5 Web Components. * * The theme is only applied if it is included in the list of available themes * managed by this provider. * * @param theme The name of the theme to apply. * @returns A promise that resolves to `true` if the theme was applied, or `false` if the theme is not supported. */ setTheme(theme: string): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Theming service specifically for the ui5/webcomponents-ngx components. */ declare class Ui5WebcomponentsThemingService extends WebcomponentsThemingProvider { name: string; /** @hidden */ constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { UI5_THEMING_CONFIGURATION, Ui5ThemingService, Ui5WebcomponentsThemingService, WebcomponentsThemingProvider }; export type { ThemingConfig, Ui5ThemingConsumer, Ui5ThemingProvider };