"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtHostTheme = void 0;
exports.createThemeApi = createThemeApi;
const ide_core_common_1 = require("@opensumi/ide-core-common");
const sumi_1 = require("../../../common/sumi");
function createThemeApi(theme) {
    return {
        getThemeColors: async (dir) => theme.getThemeColors(),
        onThemeChanged: theme.onThemeChanged,
    };
}
class ExtHostTheme {
    constructor(rpcProtocol) {
        this.rpcProtocol = rpcProtocol;
        this._onThemeChanged = new ide_core_common_1.Emitter();
        this.onThemeChanged = this._onThemeChanged.event;
        this.proxy = this.rpcProtocol.getProxy(sumi_1.MainThreadSumiAPIIdentifier.MainThreadTheme);
    }
    async $notifyThemeChanged() {
        this._onThemeChanged.fire();
    }
    async getThemeColors() {
        return this.proxy.$getThemeColors();
    }
}
exports.ExtHostTheme = ExtHostTheme;
//# sourceMappingURL=ext.host.theme.js.map