package com.bonus.core.order.common.constants;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

//public enum DishesStateEnum implements LeExcelFieldEnum<DishesStateEnum> {
public enum DishesStateEnum {
   UN_MAKE(1, "待制作"),
   MAKING(2, "制作中"),
   WAIT_DELIVERY(21, "待配送"),
   DELIVERING(22, "配送中"),
   WAIT_TAKE(3, "待领取"),
   ALREADY_TAKE(4, "已领取");

   private final Integer key;
   private final String desc;

   private DishesStateEnum(Integer key, String desc) {
      this.key = key;
      this.desc = desc;
   }

   public static String getDesc(Integer key) {
      DishesStateEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         DishesStateEnum stateEnum = var1[var3];
         if (stateEnum.getKey().equals(key)) {
            return stateEnum.getDesc();
         }
      }

      return "";
   }

   public static List<Map<String, Object>> getAllEnumsList() {
      DishesStateEnum[] enums = values();
      List<Map<String, Object>> list = new ArrayList();
      DishesStateEnum[] var2 = enums;
      int var3 = enums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         DishesStateEnum stateEnum = var2[var4];
         Map<String, Object> map = new HashMap();
         map.put("key", stateEnum.getKey());
         map.put("value", stateEnum.getDesc());
         list.add(map);
      }

      return list;
   }

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

   public String getDesc() {
      return this.desc;
   }

//   public static class ExcelConvertor extends LeExcelFieldConvertor<DishesStateEnum> {
//      public ExcelConvertor() {
//         super(DishesStateEnum.class);
//      }
//   }
}
