"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeCssVarConfig = void 0;
function mergeCssVarConfig(cssVarConfig = {}, platform = 'PCWEB') {
    let merged = { ...cssVarConfig === null || cssVarConfig === void 0 ? void 0 : cssVarConfig._ };
    let list = [platform];
    switch (platform) {
        case 'PCWEB': {
            list = ['WEB', 'PCWEB'];
            break;
        }
        case 'MOBILEWEB': {
            list = ['WEB', 'MOBILE', 'MOBILEWEB'];
            break;
        }
        case 'MP': {
            list = ['MOBILE', 'MP'];
            break;
        }
        case 'WEB':
        case 'MOBILE': {
            list = [platform];
        }
    }
    for (let key of list) {
        if (cssVarConfig[key]) {
            merged = {
                ...merged,
                ...cssVarConfig[key],
            };
        }
    }
    return merged;
}
exports.mergeCssVarConfig = mergeCssVarConfig;
