import type { ErrorMessageKey } from './i18n'; import type { ILiftStatusStore } from '../store'; import type { ILiftStatusWebComponentError } from './types'; /** * Shape a Stencil component must expose to share the error-state lifecycle * below. Methods rather than plain properties, so a component can implement * this with its own private fields (`getErrorState`/`setErrorState` reading * and writing `this.errorState`, a `@State()` field, directly). */ export interface ErrorStateHost { getErrorState(): ILiftStatusWebComponentError; setErrorState(value: ILiftStatusWebComponentError): void; getStore(): ILiftStatusStore | null; /** The element the overlay is applied to/cleared from, or null before it exists. */ overlayContainer(): HTMLElement | null; /** Called once, after `updateErrorState` observes an error clear. */ onRecovered?(): void; /** Whether the host only shows historic data, which a lost live connection doesn't block. */ showsHistoricData?: boolean; } export declare function applyErrorOverlay(host: ErrorStateHost): void; export declare function setError(host: ErrorStateHost, messageKey: ErrorMessageKey): void; export declare function clearError(host: ErrorStateHost): void; /** Mirrors the store's error state (set elsewhere, e.g. by `ls-data`) onto the host. */ export declare function updateErrorState(host: ErrorStateHost): void; export declare function logError(componentTag: string, message: string, error?: unknown): void;