import type { Theme, PartialTheme } from '@fluentui-react-native/theme-types'; /** * Argument type for listening for theme changes */ export type OnThemeChange = () => void; /** * A function that takes in a parent theme, then returns a partial set of changes to be merged with the parent theme to update * it. */ export type ThemeTransform = (parent: TTheme) => TPartial; /** * A theme recipe is either a partial theme to merge on top of a base theme, or a function that returns the same kind of * partial to merge. These are recipes because they are cached as distinct steps so that they can be reapplied if the * base theme changes */ export type ThemeRecipe = TPartial | ThemeTransform; /** * Provides a wrapper around a theme object, allowing the ability to create a theme from another theme, to listen to theme * changes, and to update the theme. * * This is the object that is designed to be handed to a theme provider, such that it can listen for changes and set the * value into context again. */ export declare class ThemeReference { private themeData; private recipes; private listeners; private getParent; private parentRef; /** * Create the theme reference, either as a plain wrapper, or a wrapper with additional transforms and/or merging * @param base - can be either another ThemeReference object, or a fully specified theme * @param recipes - any number of recipes to be applied on top of the theme object */ constructor(base: TTheme | ThemeReference, ...recipes: ThemeRecipe[]); /** * get the internal theme object, which will be created on-demand */ get theme(): TTheme; /** * register a new listener for theme changes */ addOnThemeChanged(listener: OnThemeChange): void; /** * remove a previously registered listener */ removeOnThemeChanged(listener: OnThemeChange): void; /** * invalidate the theme, causing it to be regenerated. This can happen via notifications from the parent, but * can also be called directly if a functional transform needs to be re-run */ invalidate(): void; /** * update the recipes (but not the base) in the theme. This will also implicitly invalidate the theme * since the recipes changed. */ update(...recipes: ThemeRecipe[]): void; } //# sourceMappingURL=themeReference.d.ts.map