package com.seer.teach.common.enums.im;

import com.seer.teach.common.dto.mq.DirectionalInputDTO;
import com.seer.teach.common.dto.mq.IntegerDTO;
import com.seer.teach.common.dto.mq.StringDTO;

/**
 * <p>
 *
 * </p>
 *
 * @author Captain
 * @since 2025-07-17 9:10
 */
public enum CommandTopicTagEnum {

    TELE_CONTROLLER("tele-controller", StringDTO.class),
    ENTER_AI_CORRECTION("enter-ai-correction", StringDTO.class),
    JUMP_QUESTION("jump-question", StringDTO.class),
    GAME_LONG_PRESS_DIRECTION("game-long-press-direction", DirectionalInputDTO.class),
    GAME_BACK_PREVIOUS_LEVEL("game-back-previous-level", StringDTO.class),
    EXIT_GAME("exit-game", StringDTO.class),
    GAME_SELECT_TYPE("game-select-type", IntegerDTO.class),
    GAME_OK("game-ok", StringDTO.class),
    GAME_JUMP("game-jump",StringDTO.class ),
    GAME_PREVIOUS_PAGE("game-previous-page",StringDTO.class),
    GAME_NEXT_PAGE("game-next-page",StringDTO.class),
    ERROR("error", StringDTO.class),
    QUICK_ACCESS_MODULE("quick_access_module", IntegerDTO.class );

    private final String tag;

    private Class<?> clazz;

    CommandTopicTagEnum(String tag, Class<?> clazz) {
        this.tag = tag;
        this.clazz = clazz;
    }

    public static Class getClass(String tag) {
        for (CommandTopicTagEnum value : values()) {
            if (value.tag.equalsIgnoreCase(tag)) {
                return value.clazz;
            }
        }
        return null;
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public String getTag() {
        return tag;
    }
}
