"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateScheme = exports.updateTheme = exports.updateTargetCLM = void 0;
const settings_1 = require("@ewizardjs/settings");
function updateTargetCLM(updatedValues, targetCLM) {
    var _a;
    updatedValues.targetCLM = {
        name: (_a = settings_1.TargetCLMs[targetCLM]) !== null && _a !== void 0 ? _a : targetCLM,
        code: targetCLM,
    };
}
exports.updateTargetCLM = updateTargetCLM;
function updateTheme(settings, updatedValues, theme, scheme) {
    Object.assign(updatedValues.theme, { current: theme });
    if (!scheme && typeof settings.scheme === 'string') {
        Object.assign(updatedValues.theme, { scheme: settings.scheme });
        updatedValues.scheme = undefined;
    }
}
exports.updateTheme = updateTheme;
function updateScheme(settings, updatedValues, theme, scheme) {
    Object.assign(updatedValues.theme, { scheme });
    if (!theme && typeof settings.theme === 'string') {
        Object.assign(updatedValues.theme, { current: settings.theme });
    }
    updatedValues.scheme = undefined;
}
exports.updateScheme = updateScheme;
//# sourceMappingURL=updateSettings.js.map