"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cn = void 0;
var parseNameMap = function (nameMap) {
    return Object.entries(nameMap)
        .filter(function (_a) {
        var name = _a[0], enabled = _a[1];
        return !!enabled;
    })
        .map(function (_a) {
        var name = _a[0];
        return name;
    });
};
exports.cn = function () {
    var names = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        names[_i] = arguments[_i];
    }
    var nameList = names.reduce(function (finalNames, name) {
        if (typeof name === 'string') {
            return finalNames.concat(name);
        }
        else if (typeof name === 'object' && name) {
            return finalNames.concat(parseNameMap(name));
        }
        return finalNames;
    }, []);
    return nameList
        .filter(function (name) { return name != null && name !== ''; })
        .join(' ');
};
