import { LfI18n } from './i18n.service'; import { LfStorage } from './storage.service'; import * as i0 from "@angular/core"; /** * I18n key used to set the unload alert message. */ export declare const I18N_UNLOAD_ALERT_MESSAGE_KEY = "unloadAlertMessage"; /** * Service used to enable/disable a browser alert when the user reloads/leaves * the page. The user will be reminded that they might lose filled-in form data, * and they will be able to stay in the current page or confirm their leaving of * the page. */ export declare class LfUnloadAlert { /** * Event handler function to run `beforeunload`. It makes the browser display * an alert when the application's value is dirty. */ private handler; /** * Variable that keeps track of the existence of an event listener for the * `beforeunload` event. */ private _isEnabled; constructor(lfStorage: LfStorage, lfI18n: LfI18n); /** * Whether the browser alert for when the user reloads/leaves the page is * enabled. */ get isEnabled(): boolean; /** * Enable a browser alert for when the user reloads/leaves the page. A custom * message may be passed, although most browsers will ignore it (in favour of * a default browser-specific message). Consecutive calls to this method * simply change the alert's message. * @param message Message to display on the alert (ignored by most browsers * except IE). */ enable(): void; /** * Disable the browser alert for when the user reloads/leaves the page. * Consecutive calls to this method have no effect. */ disable(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }