package com.seer.teach.netty.im.handler.mq.impl.commonand;

import com.seer.teach.common.dto.mq.DirectionalInputDTO;
import com.seer.teach.common.enums.im.CommandTopicTagEnum;
import com.seer.teach.common.enums.MessagePushStatusEnums;
import com.seer.teach.netty.common.proto.MessageType;
import com.seer.teach.netty.im.handler.mq.ImCommandHandler;
import com.seer.teach.netty.im.utils.ImUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 *
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-08-15 15:00
 */
@Slf4j
@Component
public class GameLongPressDirectionHandler implements ImCommandHandler<DirectionalInputDTO> {

    @Override
    public void handle(DirectionalInputDTO messageBody, String device) {
        ImUtils.pushSingleChatToDeviceWithAck(device, MessagePushStatusEnums.SUCCESS.getCode(), MessageType.MessageContentType.GAME_LONG_PRESS_DIRECTION.getMsgContentType(), messageBody);
    }

    @Override
    public Class<DirectionalInputDTO> getType() {
        return DirectionalInputDTO.class;
    }

    @Override
    public String getTag() {
        return CommandTopicTagEnum.GAME_LONG_PRESS_DIRECTION.getTag();
    }
}
