/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
import { Event } from "../../../base/common/event.mjs";
import { Disposable } from "../../../base/common/lifecycle.mjs";
import { URI } from "../../../base/common/uri.mjs";
import { IBackupMainService } from "../../backup/electron-main/backup.mjs";
import { IDialogMainService } from "../../dialogs/electron-main/dialogMainService.mjs";
import { IEnvironmentMainService } from "../../environment/electron-main/environmentMainService.mjs";
import { ILogService } from "../../log/common/log.mjs";
import { IProductService } from "../../product/common/productService.mjs";
import { IUserDataProfilesMainService } from "../../userDataProfile/electron-main/userDataProfile.mjs";
import { ICodeWindow } from "../../window/electron-main/window.mjs";
import { IWorkspaceIdentifier, IResolvedWorkspace } from "../../workspace/common/workspace.mjs";
import { IEnterWorkspaceResult, IUntitledWorkspaceInfo, IWorkspaceFolderCreationData } from "../common/workspaces.mjs";
export declare const IWorkspacesManagementMainService: import("../../instantiation/common/instantiation.mjs").ServiceIdentifier<IWorkspacesManagementMainService>;
export interface IWorkspaceEnteredEvent {
    readonly window: ICodeWindow;
    readonly workspace: IWorkspaceIdentifier;
}
export interface IWorkspacesManagementMainService {
    readonly _serviceBrand: undefined;
    readonly onDidDeleteUntitledWorkspace: Event<IWorkspaceIdentifier>;
    readonly onDidEnterWorkspace: Event<IWorkspaceEnteredEvent>;
    enterWorkspace(intoWindow: ICodeWindow, openedWindows: ICodeWindow[], path: URI): Promise<IEnterWorkspaceResult | undefined>;
    createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise<IWorkspaceIdentifier>;
    deleteUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise<void>;
    getUntitledWorkspaces(): IUntitledWorkspaceInfo[];
    isUntitledWorkspace(workspace: IWorkspaceIdentifier): boolean;
    resolveLocalWorkspace(path: URI): Promise<IResolvedWorkspace | undefined>;
    getWorkspaceIdentifier(workspacePath: URI): Promise<IWorkspaceIdentifier>;
}
export declare class WorkspacesManagementMainService extends Disposable implements IWorkspacesManagementMainService {
    private readonly environmentMainService;
    private readonly logService;
    private readonly userDataProfilesMainService;
    private readonly backupMainService;
    private readonly dialogMainService;
    private readonly productService;
    readonly _serviceBrand: undefined;
    private readonly _onDidDeleteUntitledWorkspace;
    readonly onDidDeleteUntitledWorkspace: Event<IWorkspaceIdentifier>;
    private readonly _onDidEnterWorkspace;
    readonly onDidEnterWorkspace: Event<IWorkspaceEnteredEvent>;
    private readonly untitledWorkspacesHome;
    private untitledWorkspaces;
    constructor(environmentMainService: IEnvironmentMainService, logService: ILogService, userDataProfilesMainService: IUserDataProfilesMainService, backupMainService: IBackupMainService, dialogMainService: IDialogMainService, productService: IProductService);
    initialize(): Promise<void>;
    resolveLocalWorkspace(uri: URI): Promise<IResolvedWorkspace | undefined>;
    private doResolveLocalWorkspace;
    private isWorkspacePath;
    private doResolveWorkspace;
    private doParseStoredWorkspace;
    createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise<IWorkspaceIdentifier>;
    private newUntitledWorkspace;
    getWorkspaceIdentifier(configPath: URI): Promise<IWorkspaceIdentifier>;
    isUntitledWorkspace(workspace: IWorkspaceIdentifier): boolean;
    deleteUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise<void>;
    private doDeleteUntitledWorkspace;
    getUntitledWorkspaces(): IUntitledWorkspaceInfo[];
    enterWorkspace(window: ICodeWindow, windows: ICodeWindow[], path: URI): Promise<IEnterWorkspaceResult | undefined>;
    private isValidTargetWorkspacePath;
    private doEnterWorkspace;
}
