package ru.kayashov.bar.bot.domain.command.impl;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import ru.kayashov.bar.bot.annotation.CommandData;
import ru.kayashov.bar.bot.domain.command.api.Command;
import ru.kayashov.bar.bot.domain.methods.AbstractMethod;
import ru.kayashov.bar.bot.domain.model.AbstractUpdate;

import java.util.List;

import static ru.kayashov.bar.bot.domain.utils.MethodUtils.deleteMessage;

@Component
@CommandData(name = "hide")
@RequiredArgsConstructor
public class HideCommand implements Command {

    @Override
    public List<? extends AbstractMethod> execute(AbstractUpdate abstractUpdate) {
        return List.of(deleteMessage(abstractUpdate.getCallbackQuery().getMessage().getChatId(),
                abstractUpdate.getCallbackQuery().getMessage().getMessageId()));
    }
}
