"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.JudgeManageHighLightMenu = 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 OKR_MANAGE = "okr";
var PROJECT_MANAGE = "project";
var PLAN_MANAGE = "plan";
var DAILY_MANAGE = "daily";
var WEEKLY_MANAGE = "weekly";
var MONTHLY_MANAGE = "monthly";

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

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

  _createClass(JudgeManageHighLightMenu, [{
    key: "isOkr",
    value: function isOkr() {
      return !!this.search.match(/\?reactRouterName=okr/);
    }
  }, {
    key: "isProject",
    value: function isProject() {
      return !!this.search.match(/\?reactRouterName=project/);
    }
  }, {
    key: "isPlan",
    value: function isPlan() {
      return !!this.search.match(/\?reactRouterName=plan/);
    }
  }, {
    key: "isDaily",
    value: function isDaily() {
      return !!this.search.match(/\?reactRouterName=daily/);
    }
  }, {
    key: "isWeekly",
    value: function isWeekly() {
      return !!this.search.match(/\?reactRouterName=weekly/);
    }
  }, {
    key: "isMonthly",
    value: function isMonthly() {
      return !!this.search.match(/\?reactRouterName=monthly/);
    }
  }, {
    key: "getHighLightMenu",
    value: function getHighLightMenu() {
      if (this.isOkr()) {
        return OKR_MANAGE;
      }

      if (this.isProject()) {
        return PROJECT_MANAGE;
      }

      if (this.isPlan()) {
        return PLAN_MANAGE;
      }

      if (this.isDaily()) {
        return DAILY_MANAGE;
      }

      if (this.isWeekly()) {
        return WEEKLY_MANAGE;
      }

      if (this.isMonthly()) {
        return MONTHLY_MANAGE;
      }

      return "";
    }
  }]);

  return JudgeManageHighLightMenu;
}();

exports.JudgeManageHighLightMenu = JudgeManageHighLightMenu;