package net.northking.cctp.element.desktop.enums;

import com.alibaba.fastjson.JSON;
import net.northking.cctp.element.core.type.EnumClass;

import java.util.*;

/**
 * <p>Title: SimulateTypeEnum</p>
 * <p>Description: </p>
 *
 * @Author chenjianfeng
 * @Version V1.0
 * @Date 2023/04/27
 * <p>Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.</p>
 */

public enum SimulateTypeEnum implements EnumClass {
    /**
     * 模拟键盘
     */
    KEYBOARD("模拟键盘", 1),
    /**
     * 模拟复制
     */
    REPRINT("模拟复制", 2);

    private String key;

    private Integer value;

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

    @Override
    public String getEnumData() {
        List<Map<String,Object>> result = new ArrayList<>();
        for (SimulateTypeEnum nullEnum : EnumSet.allOf(SimulateTypeEnum.class)) {
            Map<String,Object> one = new HashMap();
            one.put("label",nullEnum.key);
            one.put("value",nullEnum.value);
            result.add(one);
        }
        return JSON.toJSONString(result);
    }
}