package dev.crucifixbeta.mod.commands.impl;

import dev.crucifixbeta.mod.commands.Command;
import dev.crucifixbeta.mod.modules.impl.client.hud.WaterMarkHudModule;
import java.util.Arrays;
import java.util.List;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

@Environment(EnvType.CLIENT)
public class WatermarkCommand extends Command {

   public WatermarkCommand() {
      super("watermark", "[text]");
   }

   @Override
   public void runCommand(String[] parameters) {
      if (parameters.length == 0) {
         this.sendUsage();
      } else {
         StringBuilder var2 = new StringBuilder();
         boolean var3 = true;

         for (String var5 : Arrays.stream(parameters).toList()) {
            if (var3) {
               var2.append(var5);
               var3 = false;
            } else {
               var2.append(" ").append(var5);
            }
         }

         WaterMarkHudModule.INSTANCE.title.setValue(var2.toString());
      }
   }

   @Override
   public String[] getAutocorrect(int count, List<String> seperated) {
      return null;
   }
}
