package com.bonus.core.allocation.holiday.constants;

public enum HolidayTypeEnum {
   LEGAL_DAY(1, "法定节假日"),
   CUSTOM_DAY(2, "自定义节假日"),
   WORK_DAY(3, "工作日"),
   REST_DAY(4, "休息日");

   private final Integer key;
   private final String value;

   private HolidayTypeEnum(Integer key, String value) {
      this.key = key;
      this.value = value;
   }

   public static Integer getKey(String value) {
      HolidayTypeEnum[] holidayTypeEnums = values();
      HolidayTypeEnum[] var2 = holidayTypeEnums;
      int var3 = holidayTypeEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         HolidayTypeEnum holidayTypeEnum = var2[var4];
         if (holidayTypeEnum.value().equals(value)) {
            return holidayTypeEnum.key();
         }
      }

      return null;
   }

   public static String getValue(Integer key) {
      HolidayTypeEnum[] holidayTypeEnums = values();
      HolidayTypeEnum[] var2 = holidayTypeEnums;
      int var3 = holidayTypeEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         HolidayTypeEnum holidayTypeEnum = var2[var4];
         if (holidayTypeEnum.key().equals(key)) {
            return holidayTypeEnum.value();
         }
      }

      return null;
   }

   public Integer key() {
      return this.key;
   }

   public String value() {
      return this.value;
   }

   // $FF: synthetic method
   private static HolidayTypeEnum[] $values() {
      return new HolidayTypeEnum[]{LEGAL_DAY, CUSTOM_DAY, WORK_DAY, REST_DAY};
   }
}
