import type { Event } from '@difizen/mana-common';
import { Emitter } from '@difizen/mana-common';
import { ApplicationContribution } from './application';
import type { Application } from './application';
import { WindowService } from './application-protocol';
export declare class DefaultWindowService implements WindowService, ApplicationContribution {
    protected frontendApplication?: Application;
    protected onUnloadEmitter: Emitter<void>;
    get onUnload(): Event<void>;
    onStart(app: Application): void;
    canUnload(): boolean;
    /**
     * Implement the mechanism to detect unloading of the page.
     */
    protected registerUnloadListeners(): void;
    /**
     * Notify the browser that we do not want to unload.
     *
     * Notes:
     *  - Shows a confirmation popup in browsers.
     *  - Prevents the window from closing without confirmation in electron.
     *
     * @param event The beforeunload event
     */
    protected preventUnload(event: BeforeUnloadEvent): string | void;
}
//# sourceMappingURL=default-window-service.d.ts.map