package com.mortals.xhx.common.code;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author: finegirl
 * @date: 2021/7/16 11:50
 * @description: //TODO 请完善注释信息
 **/
public enum HtmlTypeEnum {
    HTML_INPUT(1, "文本框"),
    HTML_TEXTAREA(2, "文本域"),
    HTML_SELECT(3, "下拉框"),
    HTML_CHECKBOX(4, "复选框"),
    HTML_RADIO(5, "单选框"),
    HTML_DATETIME(6, "日期控件"),
    HTML_IMAGE_UPLOAD(7, "图片上传控件"),
    HTML_FILE_UPLOAD(8, "文件上传控件"),
    HTML_EDITOR(9, "富文本控件");

    private int value;
    private String desc;

     HtmlTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return this.value;
    }

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

    public static HtmlTypeEnum getByValue(int value) {
        HtmlTypeEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            HtmlTypeEnum examStatus = var1[var3];
            if (examStatus.getValue() == value) {
                return examStatus;
            }
        }

        return null;
    }

    public static Map<String, String> getEnumMap(int... eItem) {
        Map<String, String> resultMap = new LinkedHashMap();
        HtmlTypeEnum[] var2 = values();
        int var3 = var2.length;

        for(int var4 = 0; var4 < var3; ++var4) {
            HtmlTypeEnum item = var2[var4];

            try {
                boolean hasE = false;
                int[] var7 = eItem;
                int var8 = eItem.length;

                for(int var9 = 0; var9 < var8; ++var9) {
                    int e = var7[var9];
                    if (item.getValue() == e) {
                        hasE = true;
                        break;
                    }
                }

                if (!hasE) {
                    resultMap.put(item.getValue() + "", item.getDesc());
                }
            } catch (Exception var11) {
            }
        }

        return resultMap;
    }
}