"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "ConfigService", {
    enumerable: true,
    get: function() {
        return ConfigService;
    }
});
const _serverconstants = require("../../server.constants");
const _envutils = require("../../utils/env.utils");
class ConfigService {
    get(key, defaultValue) {
        return (0, _envutils.getEnvOrDefault)(key, defaultValue);
    }
    getOrThrow(key) {
        const val = this.get(key);
        if (!val) {
            throw new 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