"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtHostTheming = void 0;
const ide_core_common_1 = require("@opensumi/ide-core-common");
const vscode_1 = require("../../../common/vscode");
const ext_types_1 = require("../../../common/vscode/ext-types");
class ExtHostTheming {
    constructor(rpcProtocol) {
        this.rpcProtocol = rpcProtocol;
        this._proxy = this.rpcProtocol.getProxy(vscode_1.MainThreadAPIIdentifier.MainThreadProgress);
        this._actual = new ext_types_1.ColorTheme(ext_types_1.ColorThemeKind.Dark);
        this._onDidChangeActiveColorTheme = new ide_core_common_1.Emitter();
    }
    get activeColorTheme() {
        return this._actual;
    }
    $onColorThemeChange(type) {
        let kind;
        switch (type) {
            case 'light':
                kind = ext_types_1.ColorThemeKind.Light;
                break;
            case 'dark':
                kind = ext_types_1.ColorThemeKind.Dark;
                break;
            case 'hcDark':
                kind = ext_types_1.ColorThemeKind.HighContrast;
                break;
            case 'hcLight':
                kind = ext_types_1.ColorThemeKind.HighContrastLight;
                break;
            default:
                kind = ext_types_1.ColorThemeKind.Dark;
        }
        this._actual = new ext_types_1.ColorTheme(kind);
        this._onDidChangeActiveColorTheme.fire(this._actual);
    }
    get onDidChangeActiveColorTheme() {
        return this._onDidChangeActiveColorTheme.event;
    }
}
exports.ExtHostTheming = ExtHostTheming;
//# sourceMappingURL=ext.host.theming.js.map