import { MaybePromise } from '../../common/types.js';
import { Widget } from '../widgets/index.js';
import { SaveableService } from '../saveable-service.js';
export declare const SecondaryWindowCloseContribution: unique symbol;
/**
 * Decides which widgets are moved back to the main window when their secondary window is closed,
 * if the `window.secondaryWindowCloseBehavior` preference is `close`. All other widgets are closed.
 */
export interface SecondaryWindowCloseContribution {
    /**
     * @returns `true` if the widget would lose state if it was closed, so that it is moved back to the main window instead,
     * `false` or `undefined` if it may be closed as far as this contribution is concerned
     */
    shouldRestoreOnClose(widget: Widget): MaybePromise<boolean | undefined>;
}
/**
 * Moves widgets with unsaved changes back to the main window, unless they are saved automatically.
 */
export declare class SaveableSecondaryWindowCloseContribution implements SecondaryWindowCloseContribution {
    protected readonly saveableService: SaveableService;
    shouldRestoreOnClose(widget: Widget): boolean;
}
//# sourceMappingURL=secondary-window-close-contribution.d.ts.map