import { Router, ActivatedRoute, Params } from '@angular/router';
import { Observable } from 'rxjs';
/**
 * Service to help with interfacing with the window object
 * and navigating around the application (going outside of the Angular 2+ router)
 */
export declare class WindowService {
    private router;
    private activatedRoute;
    /**
     * Tracks if there are any unsaved changes that the user could lose.
     *
     * It is set up as `get` only because it is set with `addNavigateAwayPrompt`.
     *
     * This also includes adding a prompt to the window itself (in addition to
     * working with the `CanDeactivateUnsavedChanges` guard) to cover page reloads
     * which do not trigger router events.
     */
    get hasUnsavedChanges(): boolean;
    private _hasUnsavedChanges;
    /**
     * Expose the innerWidth on the window global. Protects against errors when code
     * is running on a non-browser platform.
     */
    get innerWidth(): number | undefined;
    /**
     * Observable of the window resize event
     */
    resized?: Observable<Event>;
    constructor(router: Router, activatedRoute: ActivatedRoute);
    /**
     * Navigates to the previous page the user had visited
     */
    goBack(): void;
    /**
     * Navigate to any url you know the path to
     * @param url The URL to navigate to
     *
     * @deprecated For legacy support only; use `router.navigateByUrl` instead
     */
    navigateToUrl(url: string): Promise<void>;
    /**
     * Adds a `beforeunload` function to the window to alert the user that there are about to leave
     * the current page and ask if they'd like to leave or stay
     */
    addNavigateAwayPrompt(): void;
    /**
     * Removes the `beforeunload` function added to the window
     */
    removeNavigateAwayPrompt(): void;
    /**
     * Send data to another window.
     *
     * __SECURITY RISK__ - Always use a specific target origin. Failing to provide a specific target origin can allow
     * malicious sites to receive the message.
     *
     * @param targetWindow - Window to send the message to
     * @param message - Data to send
     * @param targetOrigin - What the URI of the target window must be for the message to be sent.
     * If sending data to another EnergyCAP window, this should always be `window.location.origin` to ensure
     * that only instances of EnergyCAP app receive the message.
     */
    postMessage(targetWindow: Window, message: any, targetOrigin: string): void;
    /**
     * Open a new window
     * @param url - The URL of the resource to be loaded
     */
    openNew(url: string): void;
    /**
     * A wrapper around the router for changing the query params for the current url
     * without creating a new history entry or removing any existing query parameters.
     * The provided params are updated if they already exist or added to the url if they don't
     *
     * @returns a promise that resolves to true if the navigation succeeds, false if something (like a guard) blocks it.
     * In normal use, the navigation should succeed unless we use query params to block access to a route the user is already on
     */
    modifyHistoryQueryParamsSubset(queryParams: Params): Promise<boolean>;
    /**A wrapper around the default javascript confirm dialog to allow us to unit test dependent code.
     * Of course eventually we'd like to have pretty confirmations for everything, but in some cases it wasn't worth the extra time
     * so we're using this instead.
     */
    confirm(prompt: string): Promise<boolean>;
    /**
     * Close the current window or a window instance if one is provided
     * @param windowInstance - Window to close (optional)
     */
    closeWindow(windowInstance?: Window): void;
    getLocation(): string;
    /** Get the current value of the full url, including protocol, host and path */
    getFullUrl(): string;
    /**
     * Function called when the window `beforeunload` event is fired.
     *
     * A reference to the function that was passed to `window.addEventListener`
     * must be retained for `window.removeEventListener` to function properly.
     *
     * Some browsers require the event's `returnValue` to be set to show the confirmation
     * dialog.
     * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
     */
    private beforeUnloadFunction;
}
