'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _bind = require('classnames/bind');

var _bind2 = _interopRequireDefault(_bind);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var OptClass = function OptClass(context, internal, optClass) {
  var cx = _bind2.default.bind(context);

  optClass = typeof optClass === 'string' ? optClass.split(' ') : optClass;
  internal = typeof internal === 'string' ? internal.split(' ') : internal;
  var arr = [internal];

  if (optClass !== undefined) {
    arr.push(optClass);
  }
  return cx(arr);
};

exports.default = OptClass;