"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsingBlocksArrayToDictionary = exports.convertScreenCommandsToSettingsView = void 0;
function convertScreenCommandsToSettingsView(settings, options) {
    var _a, _b;
    const theme = options.theme || ((_a = settings.current) === null || _a === void 0 ? void 0 : _a.theme) || settings.theme;
    const CLM = options.clm || ((_b = settings.targetCLM) === null || _b === void 0 ? void 0 : _b.code);
    const existFieldTheme = theme ? { theme: { current: theme } } : {};
    const existFieldCLM = CLM ? { targetCLM: { code: CLM } } : {};
    const finishedObject = Object.assign(Object.assign({}, existFieldTheme), existFieldCLM);
    return finishedObject;
}
exports.convertScreenCommandsToSettingsView = convertScreenCommandsToSettingsView;
function parsingBlocksArrayToDictionary(arr) {
    const dictionary = {};
    if (!arr)
        return dictionary;
    arr.forEach((element) => dictionary[element.id] = element);
    return dictionary;
}
exports.parsingBlocksArrayToDictionary = parsingBlocksArrayToDictionary;
//# sourceMappingURL=screenUtils.js.map