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; 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; } export declare abstract class NavigationService { readonly app: App; private callbacks; constructor(app: App); abstract alert(message: string | FormattedString, title?: string): Promise; abstract confirm(message: string | FormattedString, title?: string): Promise; /** * * @param pageName url * @param p parameters * @param options {@link IPageOptions} */ openPage(pageName: string | any, p?: INameValuePairs, options?: IPageOptions): Promise; abstract notify(message: string | FormattedString, title?: string, type?: NotifyType, delay?: number): void; abstract title: string; abstract location: 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; registerNavigationHook(callback: navigateCallback): IDisposable; protected abstract openWindow(url: AtomUri, options: IPageOptions): Promise; } //# sourceMappingURL=NavigationService.d.ts.map