package com.bonus.canteen.core.device.constants;

public enum MacSelectOrdStatus {
   DAY(1, "按天"),
   INTERVAL(2, "按餐次");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

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

      return null;
   }

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

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

}
