package com.bonus.canteen.core.notice.print.v2.constant;

import cn.hutool.core.util.ObjectUtil;

public enum PrintTypeEnum {
   CANTEEN_ORDER("001001", "notice_print_type_canteen_order", "notice_print_type_canteen_order_title"),
   CANTEEN_REFUND_ORDER("001002", "notice_print_type_canteen_refund_order", "notice_print_type_canteen_refund_order_title"),
   SUPERMARKET_ORDER("001003", "notice_print_type_supermarket_order", "notice_print_type_supermarket_order_title"),
   SUPERMARKET_REFUND_ORDER("001004", "notice_print_type_supermarket_refund_order", "notice_print_type_supermarket_refund_order_title"),
   ROOM_ORDER("001005", "notice_print_type_room_order", "notice_print_type_supermarket_room_title"),
   ROOM_REFUND_ORDER("001006", "notice_print_type_room_refund_order", "notice_print_type_room_refund_order_title"),
   ACC_RECHARGE("002001", "notice_print_type_acc_recharge", "notice_print_type_acc_recharge_title"),
   ACC_WITHDRAWAL("002002", "notice_print_type_acc_withdrawal", "notice_print_type_acc_withdrawal_title");

   private final String key;
   private final String i18n;
   private final String title;

   private PrintTypeEnum(String key, String i18n, String title) {
      this.key = key;
      this.i18n = i18n;
      this.title = title;
   }

   public static String getI18n(String key) {
      PrintTypeEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         PrintTypeEnum temp = var1[var3];
         if (ObjectUtil.equal(temp.getKey(), key)) {
            return temp.getI18n();
         }
      }

      return null;
   }

   public static String getTitle(String key) {
      PrintTypeEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         PrintTypeEnum temp = var1[var3];
         if (ObjectUtil.equal(temp.getKey(), key)) {
            return temp.getTitle();
         }
      }

      return null;
   }

   public static PrintTypeEnum getPrintTypeEnum(String key) {
      PrintTypeEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         PrintTypeEnum temp = var1[var3];
         if (ObjectUtil.equal(temp.getKey(), key)) {
            return temp;
         }
      }

      return null;
   }

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

   public String getI18n() {
      return this.i18n;
   }

   public String getTitle() {
      return this.title;
   }

}
