import { App } from "../App";
import { AtomUri } from "../core/AtomUri";
import FormattedString from "../core/FormattedString";
import { CancelToken, IDisposable, INameValuePairs } from "../core/types";
export declare enum NotifyType {
    Information = "info",
    Warning = "warn",
    Error = "error"
}
export declare type navigateCallback = (url: AtomUri, options?: IPageOptions) => Promise<any>;
export interface IPageOptions {
    /**
     * target is name of a Frame or AtomTabbedPage component
     * where this window/frame should be loaded.
     */
    target?: string;
    /**
     * If set to true, it will clear the history of the frame
     */
    clearHistory?: boolean;
    /**
     * If you want to cancel the window/frame, you can remove the window by calling cancel on given CancelToken
     */
    cancelToken?: CancelToken;
    /**
     * In mobile application, this will not add chrome/navigation headers on the page
     */
    frameLess?: boolean;
    /** Initializer that will be invoked when page/popup/window is created */
    onInit?: (view: any) => void;
}
export declare abstract class NavigationService {
    readonly app: App;
    private callbacks;
    constructor(app: App);
    abstract alert(message: string | FormattedString, title?: string): Promise<any>;
    abstract confirm(message: string | FormattedString, title?: string): Promise<boolean>;
    /**
     *
     * @param pageName node style package url or a class
     * @param viewModelParameters key value pair that will be injected on ViewModel when created
     * @param options {@link IPageOptions}
     */
    openPage<T>(pageName: string | any, viewModelParameters?: INameValuePairs, options?: IPageOptions): Promise<T>;
    abstract notify(message: string | FormattedString, title?: string, type?: NotifyType, delay?: number): void;
    abstract get title(): string;
    abstract set title(v: string);
    abstract get location(): AtomUri;
    abstract set location(v: AtomUri);
    abstract navigate(url: string): void;
    abstract back(): void;
    abstract refresh(): void;
    /**
     * Sends signal to remove window/popup/frame, it will not immediately remove, because
     * it will identify whether it can remove or not by displaying cancellation warning. Only
     * if there is no cancellation warning or user chooses to force close, it will not remove.
     * @param id id of an element
     * @returns true if view was removed successfully
     */
    remove(view: {
        element: any;
        viewModel: any;
    }, force?: boolean): Promise<boolean>;
    registerNavigationHook(callback: navigateCallback): IDisposable;
    protected abstract openWindow<T>(url: AtomUri, options: IPageOptions): Promise<T>;
}
//# sourceMappingURL=NavigationService.d.ts.map