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: CombinationKeyEnum</p>
 * <p>Description: </p>
 *
 * @Author chenjianfeng
 * @Version V1.0
 * @Date 2022/12/27
 * <p>Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.</p>
 */

public enum CombinationKeyEnum implements EnumClass {
    /**
     * Alt
     */
    ALT("Alt", "Alt"),
    /**
     * Ctrl
     */
    CTRL("Ctrl", "Ctrl"),
    /**
     * Shift
     */
    SHIFT("Shift", "Shift"),
    /**
     * Win
     */
    WIN("Win", "Win");

    private String key;

    private String value;

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

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