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: MouseButtonEnum</p>
 * <p>Description: 鼠标健</p>
 *
 * @Author chenjianfeng
 * @Version V1.0
 * @Date 2022/10/18
 * <p>Copyright: NorthKing@RPA（C）2020 版权</p>
 */

public enum MouseButtonEnum implements EnumClass {
    /**
     * left
     */
    left("左键", 1),
    /**
     * middle
     */
    middle("中间键", 2),
    /**
     * right
     */
    right("右键", 3);

    private String key;

    private Integer value;

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

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