"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createWorkerHostEnvAPIFactory = createWorkerHostEnvAPIFactory;
const ide_core_common_1 = require("@opensumi/ide-core-common");
const vscode_1 = require("../../../../common/vscode");
function createWorkerHostEnvAPIFactory(rpcProtocol, extHostEnv) {
    const mainThreadEnvProxy = rpcProtocol.getProxy(vscode_1.MainThreadAPIIdentifier.MainThreadEnv);
    return {
        get appName() {
            return extHostEnv.getEnvValues().appName;
        },
        get appRoot() {
            return extHostEnv.getEnvValues().appRoot;
        },
        get language() {
            return extHostEnv.getEnvValues().language;
        },
        clipboard: {
            readText: () => mainThreadEnvProxy.$clipboardReadText(),
            writeText: (text) => mainThreadEnvProxy.$clipboardWriteText(text),
        },
        openExternal(uri) {
            return mainThreadEnvProxy.$openExternal(uri);
        },
        uriScheme: ide_core_common_1.Schemes.file,
    };
}
//# sourceMappingURL=workerEnvApiFactory.js.map