package mapped;

import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSUserComparator8;

@ObfuscatedName("eh")
public class UserComparator8 extends AbstractUserComparator implements RSUserComparator8 {
   @ObfuscatedName("at")
   final boolean reversed;

   public UserComparator8(boolean var1) {
      this.reversed = var1;
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(Lrh;Lrh;B)I",
      garbageValue = "118"
   )
   int method2946(Buddy var1, Buddy var2) {
      if(Client.worldId == var1.world) {
         if(var2.world != Client.worldId) {
            return this.reversed?-1:1;
         }
      } else if(var2.world == Client.worldId) {
         return this.reversed?1:-1;
      }

      return this.method8173(var1, var2);
   }

   public int compare(Object var1, Object var2) {
      return this.method2946((Buddy)var1, (Buddy)var2);
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(S)[Lfw;",
      garbageValue = "226"
   )
   static class140[] method2955_base() {
      return new class140[]{class140.field1617, class140.field1608, class140.field1618, class140.field1610, class140.field1611, class140.field1613, class140.field1607, class140.field1614, class140.field1615};
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(Lol;Lol;I)V",
      garbageValue = "-1842959884"
   )
   public static void method2948(AbstractArchive var0, AbstractArchive var1) {
      SpotAnimationDefinition.SpotAnimationDefinition_archive = var0;
      SpotAnimationDefinition.SpotAnimationDefinition_modelArchive = var1;
   }

   @ObfuscatedName("nq")
   @ObfuscatedSignature(
      descriptor = "(IIII)Ldc;",
      garbageValue = "853776255"
   )
   static final InterfaceParent method2954(int var0, int var1, int var2) {
      InterfaceParent var3 = new InterfaceParent();
      var3.group = var1;
      var3.type = var2;
      Client.interfaceParents.put(var3, (long)var0);
      class130.method3095_base(var1);
      Widget var4 = HealthBarDefinition.widgetDefinition.method6287(var0);
      class159.method3423(var4);
      if(Client.meslayerContinueWidget != null) {
         class159.method3423(Client.meslayerContinueWidget);
         Client.meslayerContinueWidget = null;
      }

      class132.method3138(HealthBarDefinition.widgetDefinition.Widget_interfaceComponents[var0 >> 16], var4, false);
      class106.runWidgetOnLoadListener_base(var1);
      if(Client.rootInterface != -1) {
         class514.runIntfCloseListeners_base(Client.rootInterface, 1);
      }

      return var3;
   }
}
