"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OnboardingState = exports.defaultConfigFile = void 0;
const tslib_1 = require("tslib");
const app_strings_1 = require("../../../config/app-strings");
const logger_1 = require("../../../logger");
const memCache = tslib_1.__importStar(require("../../../util/cache/memory"));
function defaultConfigFile(config) {
    return app_strings_1.configFileNames.includes(config.onboardingConfigFileName)
        ? config.onboardingConfigFileName
        : app_strings_1.configFileNames[0];
}
exports.defaultConfigFile = defaultConfigFile;
class OnboardingState {
    static get prUpdateRequested() {
        const updateRequested = !!memCache.get(OnboardingState.cacheKey);
        logger_1.logger.trace({ value: updateRequested }, 'Get OnboardingState.prUpdateRequested');
        return updateRequested;
    }
    static set prUpdateRequested(value) {
        logger_1.logger.trace({ value }, 'Set OnboardingState.prUpdateRequested');
        memCache.set(OnboardingState.cacheKey, value);
    }
}
exports.OnboardingState = OnboardingState;
OnboardingState.cacheKey = 'OnboardingState';
//# sourceMappingURL=common.js.map