"use strict";
/* !
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
function classNames() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    var classes = [];
    var _loop_1 = function (i) {
        var arg = args[i];
        if (!arg)
            return "continue";
        var argType = typeof arg;
        if (argType === 'string' || argType === 'number') {
            classes.push(arg);
        }
        else if (Array.isArray(arg)) {
            if (arg.length) {
                var inner = classes.push(classNames.apply(void 0, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(arg), false)));
                if (inner) {
                    classes.push(inner);
                }
            }
        }
        else if (argType === 'object') {
            if (arg.toString === Object.prototype.toString) {
                Object.keys(arg).forEach(function (key) {
                    arg[key] && classes.push(key);
                });
            }
            else {
                classes.push(arg.toString());
            }
        }
    };
    for (var i = 0; i < args.length; i++) {
        _loop_1(i);
    }
    return classes.join(' ');
}
exports.default = classNames;
//# sourceMappingURL=classnames.js.map