package mapped;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSReflectionCheck;

@ObfuscatedName("bj")
public class ReflectionCheck extends Node implements RSReflectionCheck {
   @ObfuscatedName("at")
   @ObfuscatedGetter(
      intValue = 612606403
   )
   int id;
   @ObfuscatedName("ah")
   @ObfuscatedGetter(
      intValue = -2014052025
   )
   int size;
   @ObfuscatedName("ar")
   int[] operations;
   @ObfuscatedName("ao")
   int[] creationErrors;
   @ObfuscatedName("ab")
   Field[] fields;
   @ObfuscatedName("au")
   int[] intReplaceValues;
   @ObfuscatedName("aa")
   Method[] methods;
   @ObfuscatedName("ac")
   byte[][][] arguments;

   public Field[] getFields() {
      return this.fields;
   }

   public Method[] getMethods() {
      return this.methods;
   }

   public byte[][][] getArgs() {
      return this.arguments;
   }

   @ObfuscatedName("ay")
   @ObfuscatedSignature(
      descriptor = "(ILdt;ZB)I",
      garbageValue = "1"
   )
   static int method710(int var0, Script var1, boolean var2) {
      Widget var3 = var2?Interpreter.scriptDotWidget:HealthBar.scriptActiveWidget;
      if(var0 == 1600) {
         Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.scrollX;
         return 1;
      } else if(var0 == 1601) {
         Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.scrollY;
         return 1;
      } else {
         class341 var7;
         if(var0 == 1602) {
            if(var3.type == 12) {
               var7 = var3.method6688_base();
               if(var7 != null) {
                  Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var7.method6616_base().method7523_base();
                  return 1;
               }
            }

            Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var3.text;
            return 1;
         } else if(var0 == 1603) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.scrollWidth;
            return 1;
         } else if(var0 == 1604) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.scrollHeight;
            return 1;
         } else if(var0 == 1605) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.modelZoom;
            return 1;
         } else if(var0 == 1606) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.modelAngleX;
            return 1;
         } else if(var0 == 1607) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.modelAngleZ;
            return 1;
         } else if(var0 == 1608) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.modelAngleY;
            return 1;
         } else if(var0 == 1609) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.transparencyTop;
            return 1;
         } else if(var0 == 1610) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.transparencyBot;
            return 1;
         } else if(var0 == 1611) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.color;
            return 1;
         } else if(var0 == 1612) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.color2;
            return 1;
         } else if(var0 == 1613) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.fillMode.rsOrdinal_base();
            return 1;
         } else if(var0 == 1614) {
            Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var3.modelTransparency?1:0;
            return 1;
         } else {
            class336 var4;
            if(var0 == 1617) {
               var4 = var3.method6724_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var4 != null?var4.field3580:0;
            }

            if(var0 == 1618) {
               var4 = var3.method6724_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var4 != null?var4.field3578:0;
               return 1;
            } else if(var0 == 1619) {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var7 != null?var7.method6644_base().method7523_base():"";
               return 1;
            } else if(var0 == 1620) {
               var4 = var3.method6724_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var4 != null?var4.field3579:0;
               return 1;
            } else if(var0 == 1621) {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6420_base():0;
               return 1;
            } else if(var0 == 1622) {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6628_base():0;
               return 1;
            } else if(var0 == 1623) {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6630_base():0;
               return 1;
            } else if(var0 == 1624) {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null && var7.method6640_base()?1:0;
               return 1;
            } else if(var0 != 1625) {
               if(var0 == 1626) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var7 != null?var7.method6609_base().method7775_base():"";
                  return 1;
               } else if(var0 == 1627) {
                  var7 = var3.method6688_base();
                  int var5 = var7 != null?var7.method6416_base():0;
                  int var6 = var7 != null?var7.method6415_base():0;
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Math.min(var5, var6);
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Math.max(var5, var6);
                  return 1;
               } else if(var0 == 1628) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6415_base():0;
                  return 1;
               } else if(var0 == 1629) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6424_base():0;
                  return 1;
               } else if(var0 == 1630) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6423_base():0;
                  return 1;
               } else if(var0 == 1631) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6425_base():0;
                  return 1;
               } else if(var0 == 1632) {
                  var7 = var3.method6688_base();
                  Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null?var7.method6550_base():0;
                  return 1;
               } else {
                  class27 var8;
                  if(var0 == 1633) {
                     var8 = var3.method6690_base();
                     Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize - 1] = var8 != null?var8.method407_base(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize - 1]):0;
                     return 1;
                  } else if(var0 == 1634) {
                     var8 = var3.method6690_base();
                     Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize - 1] = var8 != null?var8.method414_base((char)Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize - 1]):0;
                     return 1;
                  } else {
                     return 2;
                  }
               }
            } else {
               var7 = var3.method6688_base();
               Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var7 != null && var7.method6409_base()?1:0;
               return 1;
            }
         }
      }
   }

   @ObfuscatedName("lz")
   @ObfuscatedSignature(
      descriptor = "(II)Ljava/lang/String;",
      garbageValue = "674487818"
   )
   static String method711_base(int var0) {
      return var0 < 0?"":(Client.menuTargets[var0].length() > 0?Client.menuActions[var0] + " " + Client.menuTargets[var0]:Client.menuActions[var0]);
   }
}
