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

public enum WaitForReadyEnum implements EnumClass {
    /**
     * NONE
     */
    NONE("NONE", 1),
    /**
     * INTERACTIVE
     */
    INTERACTIVE("INTERACTIVE", 2),
    /**
     * COMPLETE
     */
    COMPLETE("COMPLETE", 3);

    private String key;

    private Integer value;

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

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