'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SideNavSvgIcon = exports.SideNavIcon = exports.ToggleIcon = exports.makeDefaultIcon = exports.SettingsIcon = exports.LogoutIcon = undefined;

var _Icons = require('../../components/Icons');

Object.defineProperty(exports, 'LogoutIcon', {
  enumerable: true,
  get: function get() {
    return _Icons.LogoutIcon;
  }
});
Object.defineProperty(exports, 'SettingsIcon', {
  enumerable: true,
  get: function get() {
    return _Icons.SettingsIcon;
  }
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _ramda = require('ramda');

var _ramda2 = _interopRequireDefault(_ramda);

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

var makeDefaultIcon = exports.makeDefaultIcon = function makeDefaultIcon(label) {
  return _react2.default.createElement(SideNavIcon, { type: 'circle-thin custom', text: _ramda2.default.head(label) });
};

var ToggleIcon = exports.ToggleIcon = function ToggleIcon(_ref) {
  var sideNavState = _ref.sideNavState,
      onClick = _ref.onClick;

  var sideNavIcon = sideNavState ? 'fa fa-chevron-right' : 'fa fa-chevron-left';
  return _react2.default.createElement(
    'a',
    { className: 'vs-sidenav-toggle-icon', onClick: onClick },
    _react2.default.createElement('i', { className: sideNavIcon })
  );
};

var SideNavIcon = exports.SideNavIcon = function SideNavIcon(_ref2) {
  var type = _ref2.type,
      text = _ref2.text;

  return _ramda2.default.isNil(text) ? _react2.default.createElement('i', { className: 'fa fa-' + type + ' vs-sidenav-icon' }) : _react2.default.createElement(
    'div',
    { className: 'fa-stack vs-stacked-icon class' },
    _react2.default.createElement(
      'i',
      { className: 'fa fa-' + type + ' vs-sidenav-icon' },
      _react2.default.createElement(
        'span',
        { className: 'fa fa-stack-1x single-text' },
        text
      )
    )
  );
};

var SideNavSvgIcon = exports.SideNavSvgIcon = function SideNavSvgIcon(_ref3) {
  var children = _ref3.children;

  return _react2.default.createElement(
    'div',
    { className: 'vs-sidenav-svg-icon' },
    children
  );
};