"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

var MY_INTERVIEW = 'myInterview';
var TODOS = 'todos';
var TEMPLATE = 'template';
var MANAGEMENT = 'management';
var DASHBOARD = 'dashboard';

var JudgeManageHighLightMenu = /*#__PURE__*/function () {
  function JudgeManageHighLightMenu(hash) {
    _classCallCheck(this, JudgeManageHighLightMenu);

    this.search = null;
    this.search = hash;
  }

  _createClass(JudgeManageHighLightMenu, [{
    key: "isMyInterview",
    value: function isMyInterview() {
      return !!this.search.match(/\?reactRouterName=myInterview/) || !this.search.match(/\?reactRouterName=/);
    }
  }, {
    key: "isTodos",
    value: function isTodos() {
      return !!this.search.match(/\?reactRouterName=todos/);
    }
  }, {
    key: "isTemplate",
    value: function isTemplate() {
      return !!this.search.match(/\?reactRouterName=template/);
    }
  }, {
    key: "isManagement",
    value: function isManagement() {
      return !!this.search.match(/\?reactRouterName=management/);
    }
  }, {
    key: "isDashboard",
    value: function isDashboard() {
      return !!this.search.match(/\?reactRouterName=dashboard/);
    }
  }, {
    key: "getHighLightMenu",
    value: function getHighLightMenu() {
      if (this.isMyInterview()) {
        return MY_INTERVIEW;
      }

      if (this.isTodos()) {
        return TODOS;
      }

      if (this.isTemplate()) {
        return TEMPLATE;
      }

      if (this.isManagement()) {
        return MANAGEMENT;
      }

      if (this.isDashboard()) {
        return DASHBOARD;
      }

      return '';
    }
  }]);

  return JudgeManageHighLightMenu;
}();

exports["default"] = JudgeManageHighLightMenu;