"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserSettingsService = void 0;
const path = require("path");
const yok_1 = require("../common/yok");
class UserSettingsService {
    get $jsonFileSettingsService() {
        const userSettingsFilePath = path.join(this.$settingsService.getProfileDir(), "user-settings.json");
        return this.$injector.resolve("jsonFileSettingsService", {
            jsonFileSettingsPath: userSettingsFilePath,
        });
    }
    constructor($injector, $settingsService) {
        this.$injector = $injector;
        this.$settingsService = $settingsService;
    }
    getSettingValue(settingName, cacheOpts) {
        return this.$jsonFileSettingsService.getSettingValue(settingName, cacheOpts);
    }
    saveSetting(key, value, cacheOpts) {
        return this.$jsonFileSettingsService.saveSetting(key, value, cacheOpts);
    }
    saveSettings(data, cacheOpts) {
        return this.$jsonFileSettingsService.saveSettings(data, cacheOpts);
    }
    removeSetting(key) {
        return this.$jsonFileSettingsService.removeSetting(key);
    }
    loadUserSettingsFile() {
        return this.$jsonFileSettingsService.loadUserSettingsFile();
    }
}
exports.UserSettingsService = UserSettingsService;
yok_1.injector.register("userSettingsService", UserSettingsService);
