import { type UnbindFn } from 'bind-event-listener'; import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config'; /** * Sets the theme globally at runtime. This updates the `data-theme` and `data-color-mode` attributes on your page's tag. * * @param {Object} themeState The themes and color mode that should be applied. * @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting. * @param {string} themeState.contrastMode The contrast mode theme to be applied. If set to `auto`, the theme applied will be determined by the OS setting.set to `auto`, the theme applied will be determined by the OS setting. * @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'. * @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'. * @param {string} themeState.motion The motion theme to be applied. * @param {string} themeState.shape The shape theme to be applied. * @param {string} themeState.spacing The spacing theme to be applied. * @param {string} themeState.typography The typography theme to be applied. * @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation * @param {function} themeLoader Callback function used to override the default theme loading functionality. * * @returns A Promise of an unbind function, that can be used to stop listening for changes to system theme. * * @example * ``` * setGlobalTheme({colorMode: 'auto', light: 'light', dark: 'dark', spacing: 'spacing'}); * ``` */ declare const setGlobalTheme: (nextThemeState?: Partial | ((themeState: ThemeState) => ThemeState), themeLoader?: (id: ThemeIdsWithOverrides) => void | Promise) => Promise; export default setGlobalTheme;