"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.prefix = exports.globalKey = exports.getClassNamePrefix = exports.defaultClassPrefix = void 0;

var _curry = _interopRequireDefault(require("lodash/curry"));

var _classnames = _interopRequireDefault(require("classnames"));

var globalKey = 'c7n-';
exports.globalKey = globalKey;

var getClassNamePrefix = function getClassNamePrefix() {
  return globalKey;
};

exports.getClassNamePrefix = getClassNamePrefix;

var defaultClassPrefix = function defaultClassPrefix(name) {
  return "".concat(getClassNamePrefix()).concat(name);
};

exports.defaultClassPrefix = defaultClassPrefix;
var prefix = (0, _curry["default"])(function (pre, className) {
  if (!pre || !className) {
    return '';
  }

  if (Array.isArray(className)) {
    return (0, _classnames["default"])(className.filter(function (name) {
      return !!name;
    }).map(function (name) {
      return "".concat(pre, "-").concat(name);
    }));
  }

  return "".concat(pre, "-").concat(className);
});
exports.prefix = prefix;
//# sourceMappingURL=prefix.js.map
