import { EventEmitter } from '../../stencil-public-runtime'; import { PreferenceModeType, PreferenceThemeSchemeType, PreferenceThemeTransitionType } from "../../type/preference"; import { MdsPrefChangeEventDetail } from "../../event-detail/preference"; import { TabSizeType } from "../../type/button"; /** * @category preferences */ export declare class MdsPrefMode { private element; private readonly defaultMode; private readonly t; private readonly localStorageAlias; private readonly customPropertyAlias; private readonly overlayBackgroundVisible; private readonly overlayBackgroundHidden; private cssOverlayShowDuration; private cssOverlayFadeoutDuration; private cssOverlayZIndex; private overlayEl; private readonly overlayId; private overlayTimer; private overlaySmoothTimer; private overlayShow; private syncingFromStore; private appliedMode?; private unsubscribeStore?; private updateCSSCustomProps; /** * Sets the size of the component items nested inside it */ readonly size?: TabSizeType; /** * Specifies the preference mode */ mode?: PreferenceModeType; /** * Specifies the transition of switching from a mode to another one */ transition: PreferenceThemeTransitionType; /** * Locks the mode choice to one mode, `light` or `dark`: the control shows that mode * selected and disables the other two items, without touching the stored preference, * which comes back when the lock goes. `all` locks nothing. Unset, the control follows * the active theme: a theme that can be used in one mode only (`pref-theme-scheme-light` * or `-dark` on ``, written by `mds-pref-theme` from the mode the theme declares, * #1274) locks it the same way. Not meant to be set directly. */ readonly lockedScheme?: PreferenceThemeSchemeType; /** * Emits when the component is triggered */ prefChangeEvent: EventEmitter; private readonly modes; componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; componentDidLoad(): void; modeChanged(newValue: PreferenceModeType, oldValue: PreferenceModeType): void; /** * Follows a mode applied elsewhere (another instance, or a writer of the * `` classes) without applying it again: no event, no storage write. */ private readonly syncMode; /** * Applies a mode once per change, and announces it once applied: the `mode` watcher * calls this again for the value it has just been given, which used to emit a second * mdsPrefChange, and the first application, the one of load, is no change to announce. */ private readonly setMode; private readonly isDarkMode; private readonly getColorScheme; private instanceOverlay; private detachOverlayTransition; private attachFlashOverlayTransition; private attachSmoothOverlayTransition; /** * The mode the choice is locked to: the prop, or else the scheme of the active theme, which * the store mirrors from ``. Read in render, so a theme picked anywhere re-renders it. */ private readonly lockedMode; /** * The mode the control shows: the one the theme locks the page to, since that is the mode * the page is in whatever was picked, or else the person's choice. */ private readonly shownMode; private readonly isModeDisabled; private changeMode; private readonly handleModeClick; render(): any; }