package eu.mhsl.minenet.minigames.command.privileged;

import eu.mhsl.minenet.minigames.command.PrivilegedCommand;
import eu.mhsl.minenet.minigames.message.Icon;
import eu.mhsl.minenet.minigames.message.type.ActionBarMessage;
import eu.mhsl.minenet.minigames.message.type.ChatMessage;
import eu.mhsl.minenet.minigames.message.type.TitleMessage;
import net.minestom.server.entity.Player;

import java.util.ArrayList;
import java.util.List;

public class DebugCommand extends PrivilegedCommand {
    public DebugCommand() {
        super("debug");

        setDefaultExecutor((sender, args) -> {
            new ChatMessage(Icon.CHAT).appendTranslated("sample").send(sender);
            new ActionBarMessage().appendTranslated("sample").send(sender);
            new TitleMessage().subtitle(subtitleMessage -> subtitleMessage.appendTranslated("sample")).appendTranslated("sample").send(sender);
            List<String> testplayers = new ArrayList<>() {
                {
                    add("MineTec");
                    add("Goldi187");
                    add("Test");
                }
            };
            new ChatMessage(Icon.STAR, true)
                    .appendTranslated("score#result")
                    .newLine()
                    .indent()
                    .numberedList(testplayers)
                    .undent()
                    .newLine()
                    .appendTranslated("score#thanks")
                    .send(sender);

            new ChatMessage(Icon.SCIENCE).appendStatic(((Player) sender).getUuid().toString()).send(sender);
        });

    }
}
