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

public enum MenuSalesTypeEnum {
   PORTION_ON(1, "按份"),
   WEIGHT_ON(2, "称重");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

      for(int var4 = 0; var4 < var3; ++var4) {
         MenuSalesTypeEnum 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 MenuSalesTypeEnum[] $values() {
      return new MenuSalesTypeEnum[]{PORTION_ON, WEIGHT_ON};
   }
}
