package com.bonus.canteen.core.menu.constant;

public enum MenuRecipeTypeEnum {
   DEFAULT(1, "默认"),
   PER_DAY(2, "按天"),
   PER_WEEK(3, "按周"),
   PER_MONTH(4, "按月");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

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

      return null;
   }

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

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

   // $FF: synthetic method
   private static MenuRecipeTypeEnum[] $values() {
      return new MenuRecipeTypeEnum[]{DEFAULT, PER_DAY, PER_WEEK, PER_MONTH};
   }
}
