/** Core */ import { Generic } from "cmf.core/src/core"; /** * NavigationGuard * * This service is used to block the navigation with a guard. If the user goes back or forward * the navigation is halted until a condition returns true. Useful in wizards, because when the user press back, * a confirmation modal is shown on the execution of the guard condition and only if user presses ok the navigation succeed * otherwise it will remain in the same url */ export declare class NavigationGuard extends Generic { /** * Guard condition */ private guardCondition; /** * Is activated */ private active; /** * Initial href */ private initialHref; /** * On guard condition evaluate process */ private onGuardConditionEvaluateProcess; /** * Constructor */ constructor(); /** * Navigation listener */ private navigationListener; /** * Init guard, setting the current location to be guarded * The guard will make the browser to remain in the current url while the guard condition is true * @param conditionEvaluateCallback guard condition callback * that evaluates if the browser is allowed to exit the current url */ init(conditionEvaluateCallback: (event: any) => Promise): void; /** * Destroy */ destroy(): void; }