package com.bonus.canteen.core.nutrition.common.enums;

public enum HealthDishSourceEnum {
   CUSTOM(1, "APP端自定义添加"),
   MENU(2, "菜品库");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

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

      return null;
   }

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

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

}
