package mapped;

import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSWorldMapLabelSize;

@ObfuscatedName("io")
public class WorldMapLabelSize implements RSWorldMapLabelSize {
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "Lio;"
   )
   public static final WorldMapLabelSize WorldMapLabelSize_small;
   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "Lio;"
   )
   public static final WorldMapLabelSize WorldMapLabelSize_medium;
   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "Lio;"
   )
   public static final WorldMapLabelSize WorldMapLabelSize_large;
   @ObfuscatedName("ap")
   public static short[] field2440;
   @ObfuscatedName("as")
   static int[] field2441;
   @ObfuscatedName("ao")
   @ObfuscatedGetter(
      intValue = 38132727
   )
   final int field2437;
   @ObfuscatedName("ab")
   @ObfuscatedGetter(
      intValue = 1290743797
   )
   final int field2438;
   @ObfuscatedName("au")
   @ObfuscatedGetter(
      intValue = 25588645
   )
   final int field2436;

   static {
      WorldMapLabelSize_small = new WorldMapLabelSize(0, 0, 4);
      WorldMapLabelSize_medium = new WorldMapLabelSize(2, 1, 2);
      WorldMapLabelSize_large = new WorldMapLabelSize(1, 2, 0);
   }

   WorldMapLabelSize(int var1, int var2, int var3) {
      this.field2437 = var1;
      this.field2438 = var2;
      this.field2436 = var3;
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(FB)Z",
      garbageValue = "-28"
   )
   boolean method4486_base(float var1) {
      return var1 >= (float)this.field2436;
   }

   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "(IB)Lio;",
      garbageValue = "-1"
   )
   static WorldMapLabelSize method4487(int var0) {
      WorldMapLabelSize[] var1 = new WorldMapLabelSize[]{WorldMapLabelSize_large, WorldMapLabelSize_medium, WorldMapLabelSize_small};
      WorldMapLabelSize[] var2 = var1;

      for(int var3 = 0; var3 < var2.length; ++var3) {
         WorldMapLabelSize var4 = var2[var3];
         if(var0 == var4.field2438) {
            return var4;
         }
      }

      return null;
   }

   @ObfuscatedName("ci")
   @ObfuscatedSignature(
      descriptor = "(II)Ljava/lang/Object;",
      garbageValue = "-1950450301"
   )
   static Object method4488_base(int var0) {
      return class408.method7657_base((class514)class12.method170(class514.method9122_base(), var0));
   }

   @ObfuscatedName("iz")
   @ObfuscatedSignature(
      descriptor = "(Lds;III)V",
      garbageValue = "-896511288"
   )
   static void method4493(Player var0, int var1, int var2) {
      if(var0.sequence == var1 && var1 != -1) {
         int var3 = DynamicObject.method2245(var1).restartMode;
         if(var3 == 1) {
            var0.sequenceFrame = 0;
            var0.sequenceFrameCycle = 0;
            var0.sequenceDelay = var2;
            var0.field1199 = 0;
         }

         if(var3 == 2) {
            var0.field1199 = 0;
         }
      } else if(var1 == -1 || var0.sequence == -1 || DynamicObject.method2245(var1).field2223 >= DynamicObject.method2245(var0.sequence).field2223) {
         var0.sequence = var1;
         var0.animationChanged(-1);
         var0.sequenceFrame = 0;
         var0.sequenceFrameCycle = 0;
         var0.sequenceDelay = var2;
         var0.field1199 = 0;
         var0.field1220 = var0.pathLength;
      }

   }

   @ObfuscatedName("lb")
   @ObfuscatedSignature(
      descriptor = "(Ldn;IIII)V",
      garbageValue = "-140985889"
   )
   static final void method4485(NPC var0, int var1, int var2, int var3) {
      if(SpriteMask.client.getCallbacks().draw(var0, false)) {
         Scene.copy$addNpcToMenu(var0, var1, var2, var3, -140985889);
      }

   }
}
