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

import com.seer.teach.common.dto.mq.IntegerDTO;
import com.seer.teach.common.dto.mq.im.AiChatResp;
import com.seer.teach.common.dto.mq.StringDTO;
import com.seer.teach.common.dto.mq.im.AiStudyDTO;

/**
 * <p>
 *
 * </p>
 *
 * @author Captain
 * @since 2025-07-17 21:48
 */
public enum LargeModuleTopTagEnum {

    RECEIVE_VOICE_MESSAGES("receive-voice-messages", AiChatResp.class),
    ENTER_AI_CORRECTION("enter-ai-correction", StringDTO.class),

    STUDY_STATUS("study-status", IntegerDTO.class),
    RECEIVE_STUDY_DATA_STREAM("receive-study-data-stream", AiStudyDTO.class),
    RECEIVE_STUDY_DATA_STREAM_ERROR("receive-study-data-stream-error",StringDTO.class),
    CONTINUE_SMART_READING_OR_TREASURE_CHESTS("continue-smart-reading-or-treasure-chests",IntegerDTO.class),
    STUDY_OVER("study-over",StringDTO.class);

    private final String tag;

    private Class<?> clazz;

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

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

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

    public String getTag() {
        return tag;
    }
}
