package net.northking.cctp.designer.ws.server;

public enum InstructSetTransetionEnum {
    START("detect_start","Start","开始录制"),
    STOP("detect_stop","Stop","停止录制"),
    INIT_ENVT("device_init","InitEnv","初始化设备"),
    COMPLETE("device_exit","Complete","退出设备"),
    START_DEBUG("replay_start","StartDebug","开始回放"),
    STOP_DEBUG("replay_stop","StopDebug","停止回放"),
    DETECT_ELEMENT("detect_element","detect_element","获取元素"),
    DETECT_DELAY("detect_delay","DelayFetch","延迟选择元素"),
    CUTTING_SCREEN("detect_adjust","CuttingScreen","录制窗口大小变化"),
    CLOSE_BROWSER_TABS("close_browser_tabs","CloseBrowserTabs","关闭浏览器标签页"),
    DETECT_MODE("detect_mode","FetchElementType","切换元素选择模式");

    private String frontCode;
    private String code;
    private String name;

    InstructSetTransetionEnum(String frontCode, String code, String name) {
        this.frontCode = frontCode;
        this.code = code;
        this.name = name;
    }

    public static String getCode(String frontCode){
        InstructSetTransetionEnum[] values = InstructSetTransetionEnum.values();
        for (InstructSetTransetionEnum value : values) {
            if (value.getFrontCode().equals(frontCode)){
                return value.getCode();
            }
        }
        return null;
    }

    public String getFrontCode() {
        return frontCode;
    }


    public String getCode() {
        return code;
    }


    public String getName() {
        return name;
    }

}
