"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "ConfigService", {
    enumerable: true,
    get: function() {
        return ConfigService;
    }
});
const _serverconstants = require("../../server.constants");
class ConfigService {
    get(key, defaultValue) {
        if (!Object.keys(process.env).includes(key) || !process.env[key]?.length) {
            return defaultValue;
        }
        return process.env[key];
    }
    getOrThrow(key) {
        const val = this.get(key);
        if (!val) {
            throw Error(`Environment variable with key ${key} was not defined.`);
        }
    }
    isDemoMode() {
        return this.get(_serverconstants.AppConstants.OVERRIDE_IS_DEMO_MODE, "false") === "true";
    }
}

//# sourceMappingURL=config.service.js.map