"use strict";
var CodiacRestClientConfig_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodiacRestClientConfig = void 0;
const tslib_1 = require("tslib");
const os = require("os");
const path = require("path");
const inversify_1 = require("inversify");
const config_loader_1 = require("../common/config-loader");
/** The in-memory representation of the api client config file.
 */
let CodiacRestClientConfig = CodiacRestClientConfig_1 = class CodiacRestClientConfig {
    static load() {
        const os = require('os');
        let cfg = this.loader.load(); // yeah this is real helpful - maybe we should just accept the .loader.load() syntax and expose the loader itself?
        return cfg;
    }
    constructor() {
    }
};
CodiacRestClientConfig.CONFIG_PATH = path.posix.join(os.homedir(), `.config`, `codiac-api-client`);
CodiacRestClientConfig.CONFIG_FILENAME = "config.json";
CodiacRestClientConfig.loader = new config_loader_1.ConfigLoader(CodiacRestClientConfig_1.CONFIG_PATH, CodiacRestClientConfig_1.CONFIG_FILENAME);
CodiacRestClientConfig = CodiacRestClientConfig_1 = tslib_1.__decorate([
    (0, inversify_1.injectable)(),
    tslib_1.__metadata("design:paramtypes", [])
], CodiacRestClientConfig);
exports.CodiacRestClientConfig = CodiacRestClientConfig;
//# sourceMappingURL=client-config.js.map