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

public enum SelectedKeyEnum implements EnumClass {

    SPECIALkEYS("Special Keys", "Special Keys"),
    ADD("Add", "Add"),
    ALT("Alt", "Alt"),
    BACK("Back", "Back"),
    CAPSLOCK("CapsLock", "CapsLock"),
    CONTROL("Control", "Control"),
    DECIMAL("Decimal", "Decimal"),
    DELETE("Delete", "Delete"),
    DIVIDE("Divide", "Divide"),
    DOWN("Down", "Down"),
    END("End", "End"),
    ENTER("Enter", "Enter"),
    ESC("Esc", "Esc"),
    F1("F1", "F1"),
    F2("F2", "F2"),
    F3("F3", "F3"),
    F4("F4", "F4"),
    F5("F5", "F5"),
    F6("F6", "F6"),
    F7("F7", "F7"),
    F8("F8", "F8"),
    F9("F9", "F9"),
    F10("F10", "F10"),
    F11("F11", "F11"),
    F12("F12", "F12"),
    HOME("Home", "Home"),
    INSERT("Insert", "Insert"),
    LEFT("Left", "Left"),
    MULTIPLY("Multiply", "Multiply"),
    NUMLOCK("Numlock", "Numlock"),
    KEY_0("0", "0"),
    KEY_1("1", "1"),
    KEY_2("2", "2"),
    KEY_3("3", "3"),
    KEY_4("4", "4"),
    KEY_5("5", "5"),
    KEY_6("6", "6"),
    KEY_7("7", "7"),
    KEY_8("8", "8"),
    KEY_9("9", "9"),
    KEY_A("A", "A"),
    KEY_B("B", "B"),
    KEY_C("C", "C"),
    KEY_D("D", "D"),
    KEY_E("E", "E"),
    KEY_F("F", "F"),
    KEY_G("G", "G"),
    KEY_H("H", "H"),
    KEY_I("I", "I"),
    KEY_J("J", "J"),
    KEY_K("K", "K"),
    KEY_L("L", "L"),
    KEY_M("M", "M"),
    KEY_N("N", "N"),
    KEY_O("O", "O"),
    KEY_P("P", "P"),
    KEY_Q("Q", "Q"),
    KEY_R("R", "R"),
    KEY_S("S", "S"),
    KEY_T("T", "T"),
    KEY_U("U", "U"),
    KEY_V("V", "V"),
    KEY_W("W", "W"),
    KEY_X("X", "X"),
    KEY_Y("Y", "Y"),
    KEY_Z("Z", "Z"),
    PAUSE("Pause", "Pause"),
    PAGE_UP("PAGE_UP", "PAGE_UP"),
    PAGE_DOWN("PAGE_DOWN", "PAGE_DOWN"),
    RIGHT("Right", "Right"),
    SCROLL("Scroll", "Scroll"),
    SHIFT("Shift", "Shift"),
    SLEEP("Sleep", "Sleep"),
    SUBTRACT("Subtract", "Subtract"),
    TAB("Tab", "Tab"),
    UP("Up", "Up");

    private String key;

    private String value;

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

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