package com.bonus.constant;

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

public enum SourceTypeEnum {
   WECHAT_SMALL_PRO(1, "微信小程序"),
   WECHAT_OFFACCT(2, "微信公众号"),
   WECHAT_ENTERPRISE(3, "企业微信"),
   DING_TALK(4, "钉钉"),
   ALI_LIFE_CODE(5, "支付宝"),
   ABC_MOBILE(6, "农行掌银"),
   HT_H5_MOBILE(7, "H5"),
   OPEN_API(8, "开放接口"),
   DING_TALK_INSIDE_H5(9, "钉钉内部应用H5"),
   DING_TALK_SAAS_H5(10, "钉钉第三方企业应用H5"),
   TENG_YUN_MANAGE_WEB(11, "WEB管理端"),
   ANDROID_DUAL_SCREEN(20, "双屏消费机"),
   ANDROID_HANG_CONSUMER(21, "安卓挂式机"),
   HANDHELD(22, "手持机"),
   ANDROID_DINING_TABLE(23, "智慧餐台"),
   ANDROID_SELF_RECHARGE(25, "自助终端"),
   MEAL_LOCKER(26, "取餐柜"),
   ANDROID_BINDING(30, "安卓绑定机"),
   PRINTER(31, "打印机"),
   PRODUCTION(32, "出品机"),
   PRODUCTION_TRANSFER(33, "出品机中转设备"),
   SCAN_CODE_TOLL(34, "扫码收费机"),
   AUTONOMOUS_WEIGHING(35, "计量主机"),
   BUFFET(36, "自助点餐机"),
   WRITE_OFF(37, "核销机"),
   CALL_MACHINE(38, "叫号机"),
   COUPON(39, "餐券"),
   ISSUE(40, "信息发布屏"),
   VERTICAL_CONSUME(41, "立式消费机"),
   UFACE_MONITOR(42, "R23WFC-人脸识别终端"),
   LEAVE_A_PROTOTYPE(43, "留样机"),
   BATCH_PRODUCTION(44, "批量出品机"),
   DISH_MANAGE_PAD(46, "排菜平板"),
   PAYMENT_POS(47, "单屏消费机"),
   WATER_CONTROL(48, "水控机"),
   PERSON_FLOW_DETECTOR(49, "客流检测"),
   AI_DISHES_RECOGNIZER(50, "AI菜品识别"),
   AI_DISHES_TERMINAL(51, "AI菜品采集终端"),
   SUPERMARKET_CASH_REGISTER(52, "自助超市收银机"),
   DUAL_SCREEN_CASH_REGISTER(53, "双屏超市收银机"),
   WEIGHT_LABEL_PRINT(54, "称重标签打印机"),
   PRODUCTION_GATEWAY(55, "出品机网关"),
   SUPERMARKET_PRINT(56, "超市打印机"),
   PRICE_TAG(57, "营养价签机"),
   PRICE_TAG_CONTROL(58, "营养价签控制机"),
   PESTICIDE_RESIDUE_ANALYZER(59, "农药残留检测仪"),
   DC_TERMINAL(60, "门禁设备"),
   DC_DOOR(61, "门设备"),
   GOODS_LOCKER(62, "取货柜"),
   ORDER_PAD(63, "点餐Pad"),
   HEIGHT_WEIGHT(64, "身高体重称"),
   WEIGHT_MARGIN_BOARD(65, "计量主机余量面板"),
   BUS_DEVICE(66, "车载设备终端"),
   AI_ELECTRONIC_SCALE(66, "AI电子秤"),
   WEIGHT_PRODUCTION_IN_ONE(67, "称重出品一体机"),
   WEIGHT_PRODUCTION_IN_ONE_CONTROLS(68, "称重出品一体机控制终端"),
   ALI_BUS_FACE_MACHINE(69, "阿里企业码班车刷脸机"),
   AI_DISHES_UTENSIL_RECOGNIZER(70, "AI菜品餐具识别"),
   SMART_KEEP_WARM_TERMINAL(71, "智能保温控制终端"),
   FRESH_CABINET(72, "生鲜柜"),
   SELF_VISITOR_DEVICE(73, "自助访客机"),
   SMART_WEIGHT_CONTAINER(74, "智能称货柜"),
   DISHES_AI(76, "菜品识别服务器"),
   DUAL_VISITOR_DEVICE(75, "双屏访客机"),
   OTHER(100, "其他第三方"),
   OUTER_THIRD_MACHINE(101, "外部第三方设备"),
   CANTEEN_VOICE(102, "收银喇叭(食堂)"),
   MARKET_VOICE(103, "收银喇叭(商超)"),
   UNKNOW(999, "未知设备");

   private final Integer key;
   private final String desc;

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

   public static Map<String, Integer> getDescKeyMap() {
      Map<String, Integer> map = new HashMap();
      SourceTypeEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         SourceTypeEnum temp = var1[var3];
         map.put(temp.getDesc(), temp.getKey());
      }

      return map;
   }

   public static SourceTypeEnum getByDesc(Integer key) {
      SourceTypeEnum[] var1 = values();
      int var2 = var1.length;

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

      return UNKNOW;
   }

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

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

      return "";
   }

   public static List<Integer> getMachineTypeList() {
      List<Integer> machineTypeList = new ArrayList();
      machineTypeList.add(ANDROID_DUAL_SCREEN.getKey());
      machineTypeList.add(ANDROID_HANG_CONSUMER.getKey());
      machineTypeList.add(HANDHELD.getKey());
      machineTypeList.add(ANDROID_DINING_TABLE.getKey());
      machineTypeList.add(SCAN_CODE_TOLL.getKey());
      machineTypeList.add(BUFFET.getKey());
      machineTypeList.add(UFACE_MONITOR.getKey());
      machineTypeList.add(LEAVE_A_PROTOTYPE.getKey());
      return machineTypeList;
   }

   public static List<Integer> getAppTypeList() {
      List<Integer> appTypeList = new ArrayList();
      appTypeList.add(WECHAT_SMALL_PRO.getKey());
      appTypeList.add(WECHAT_OFFACCT.getKey());
      appTypeList.add(WECHAT_ENTERPRISE.getKey());
      appTypeList.add(DING_TALK.getKey());
      appTypeList.add(ALI_LIFE_CODE.getKey());
      appTypeList.add(ABC_MOBILE.getKey());
      appTypeList.add(HT_H5_MOBILE.getKey());
      return appTypeList;
   }

   public static List<Integer> getMacMealLineMachineTypeList() {
      List<Integer> appTypeList = new ArrayList();
      appTypeList.add(ANDROID_DINING_TABLE.getKey());
      appTypeList.add(ANDROID_BINDING.getKey());
      appTypeList.add(PRODUCTION.getKey());
      appTypeList.add(AUTONOMOUS_WEIGHING.getKey());
      return appTypeList;
   }

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

      for(int var4 = 0; var4 < var3; ++var4) {
         SourceTypeEnum typeEnum = var2[var4];
         Map<String, Object> typeMap = new HashMap();
         typeMap.put("key", typeEnum.getKey());
         typeMap.put("value", typeEnum.getDesc());
         typeList.add(typeMap);
      }

      return typeList;
   }

   public static List<Integer> getLoginSourceTypeListOfSingleCustCasual() {
      List<Integer> typeList = new ArrayList();
      typeList.add(WECHAT_OFFACCT.getKey());
      typeList.add(ALI_LIFE_CODE.getKey());
      typeList.add(HT_H5_MOBILE.getKey());
      return typeList;
   }

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

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