"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "LogoutIcon", {
  enumerable: true,
  get: function get() {
    return _Icons.LogoutIcon;
  }
});
Object.defineProperty(exports, "SettingsIcon", {
  enumerable: true,
  get: function get() {
    return _Icons.SettingsIcon;
  }
});
exports.SideNavSvgIcon = exports.SideNavIcon = exports.ToggleIcon = exports.makeDefaultIcon = void 0;

var _react = _interopRequireDefault(require("react"));

var R = _interopRequireWildcard(require("ramda"));

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

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

/** @prettier */
var makeDefaultIcon = function makeDefaultIcon(label) {
  return _react.default.createElement(SideNavIcon, {
    type: "circle-thin custom",
    text: R.head(label)
  });
};

exports.makeDefaultIcon = makeDefaultIcon;

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

exports.ToggleIcon = ToggleIcon;

var SideNavIcon = function SideNavIcon(_ref2) {
  var type = _ref2.type,
      text = _ref2.text;
  return R.isNil(text) ? _react.default.createElement("i", {
    className: "fa fa-".concat(type, " vs-sidenav-icon")
  }) : _react.default.createElement("div", {
    className: "fa-stack vs-stacked-icon class"
  }, _react.default.createElement("i", {
    className: "fa fa-".concat(type, " vs-sidenav-icon")
  }, _react.default.createElement("span", {
    className: "fa fa-stack-1x single-text"
  }, text)));
};

exports.SideNavIcon = SideNavIcon;

var SideNavSvgIcon = function SideNavSvgIcon(_ref3) {
  var children = _ref3.children;
  return _react.default.createElement("div", {
    className: "vs-sidenav-svg-icon"
  }, children);
};

exports.SideNavSvgIcon = SideNavSvgIcon;