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

public enum MenuMaterialTypeEnum {
   MAIN_INGREDIENT(1, "主料"),
   AUX_INGREDIENT(2, "辅料"),
   DOS_INGREDIENT(3, "配料");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

      for(int var4 = 0; var4 < var3; ++var4) {
         MenuMaterialTypeEnum 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 MenuMaterialTypeEnum[] $values() {
      return new MenuMaterialTypeEnum[]{MAIN_INGREDIENT, AUX_INGREDIENT, DOS_INGREDIENT};
   }
}
