import { UNKNOWN_EMPTY_WINDOW_WORKSPACE } from './vscode/src/vs/platform/workspace/common/workspace.js';
import { isWorkspaceToOpen, isFolderToOpen } from './vscode/src/vs/platform/window/common/window.js';
import { getWorkspaceIdentifier as getWorkspaceIdentifier$1, getSingleFolderWorkspaceIdentifier } from './vscode/src/vs/workbench/services/workspaces/browser/workspaces.js';
import { URI } from './vscode/src/vs/base/common/uri.js';
import { toLocalISOString } from './vscode/src/vs/base/common/date.js';
let workbenchContainer = document.body;
let workbenchConstructionOptions = {};
let workspaceIdentifier = UNKNOWN_EMPTY_WINDOW_WORKSPACE;
const logsPath = URI.file(toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')).with({ scheme: 'vscode-log' });
function getWorkbenchContainer() {
    return workbenchContainer;
}
function getWorkbenchConstructionOptions() {
    return workbenchConstructionOptions;
}
function getWorkspaceIdentifier() {
    return workspaceIdentifier;
}
function resolveWorkspace(configuration) {
    let workspace;
    if (configuration.workspaceProvider != null) {
        workspace = configuration.workspaceProvider.workspace;
    }
    if (workspace != null && isWorkspaceToOpen(workspace)) {
        return getWorkspaceIdentifier$1(workspace.workspaceUri);
    }
    if (workspace != null && isFolderToOpen(workspace)) {
        return getSingleFolderWorkspaceIdentifier(workspace.folderUri);
    }
    return UNKNOWN_EMPTY_WINDOW_WORKSPACE;
}
function initialize(container, options) {
    workbenchContainer = container;
    workbenchConstructionOptions = options;
    workspaceIdentifier = resolveWorkspace(options);
}
export { getWorkbenchConstructionOptions, getWorkbenchContainer, getWorkspaceIdentifier, initialize, logsPath };
