package mapped;

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

@ObfuscatedName("oc")
public class PlayerType implements MouseWheel, RSPlayerType {
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_normal;
   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_playerModerator;
   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_jagexModerator;
   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_ironman;
   @ObfuscatedName("ab")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_ultimateIronman;
   @ObfuscatedName("au")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType PlayerType_hardcoreIronman;
   @ObfuscatedName("aa")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4247;
   @ObfuscatedName("ac")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4243;
   @ObfuscatedName("al")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4249;
   @ObfuscatedName("az")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4248;
   @ObfuscatedName("ap")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4250;
   @ObfuscatedName("av")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4256;
   @ObfuscatedName("ax")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4253;
   @ObfuscatedName("as")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4254;
   @ObfuscatedName("ay")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4255;
   @ObfuscatedName("ak")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4241;
   @ObfuscatedName("aj")
   @ObfuscatedSignature(
      descriptor = "Loc;"
   )
   static final PlayerType field4257;
   @ObfuscatedName("am")
   @ObfuscatedGetter(
      intValue = -142166065
   )
   final int id;
   @ObfuscatedName("aq")
   @ObfuscatedGetter(
      intValue = 587948549
   )
   public final int modIcon;
   @ObfuscatedName("ai")
   public final boolean isPrivileged;
   @ObfuscatedName("aw")
   public final boolean isUser;

   static {
      PlayerType_normal = new PlayerType(0, -1, true, false, true);
      PlayerType_playerModerator = new PlayerType(1, 0, true, true, true);
      PlayerType_jagexModerator = new PlayerType(2, 1, true, true, false);
      PlayerType_ironman = new PlayerType(3, 2, false, false, true);
      PlayerType_ultimateIronman = new PlayerType(4, 3, false, false, true);
      PlayerType_hardcoreIronman = new PlayerType(5, 10, false, false, true);
      field4247 = new PlayerType(6, 22, false, false, true);
      field4243 = new PlayerType(7, 41, false, false, true);
      field4249 = new PlayerType(8, 42, false, false, true);
      field4248 = new PlayerType(9, 43, false, false, true);
      field4250 = new PlayerType(10, 44, false, false, true);
      field4256 = new PlayerType(11, 45, false, false, true);
      field4253 = new PlayerType(12, 46, false, false, true);
      field4254 = new PlayerType(13, 47, false, false, true);
      field4255 = new PlayerType(14, 48, false, false, true);
      field4241 = new PlayerType(15, 49, false, false, true);
      field4257 = new PlayerType(16, 52, false, false, true);

      //Id server side will have to be changed, I recomment having custom ids with id 30+
      EMERALD_DONATOR = new PlayerType(30, 60, false, false, true);
      RUBY_DONATOR = new PlayerType(31, 61, false, false, true);
      DIAMOND_DONATOR = new PlayerType(32, 62, false, false, true);
      DRAGONSTONE_DONATOR = new PlayerType(33, 63, false, false, true);
      ONYX_DONATOR = new PlayerType(34, 64, false, false, true);
      ZENYTE_DONATOR = new PlayerType(35, 65, false, false, true);

      SUPPORT = new PlayerType(36, 15, false, false, true);
      DEVELOPER = new PlayerType(37, 67, /*16,*/ false, false, true);
      BETA_TESTER = new PlayerType(38, 68,/*14, */false, false, true);
      YOUTUBER = new PlayerType(39, 69, /*17,*/ false, false, true);
   }

   static final PlayerType EMERALD_DONATOR, RUBY_DONATOR, DIAMOND_DONATOR,
           DRAGONSTONE_DONATOR, ONYX_DONATOR, ZENYTE_DONATOR, SUPPORT,
           DEVELOPER, BETA_TESTER, YOUTUBER;

   PlayerType(int var1, int var2, boolean var3, boolean var4, boolean var5) {
      this.id = var1;
      this.modIcon = var2;
      this.isPrivileged = var4;
      this.isUser = var5;
   }

   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "(B)I",
      garbageValue = "-11"
   )
   public int rsOrdinal_base() {
      return this.id;
   }

   @ObfuscatedName("as")
   @ObfuscatedSignature(
      descriptor = "(IIII)D",
      garbageValue = "-2021333271"
   )
   static double method6883_base(int var0, int var1, int var2) {
      double var3 = var1 > 0?(double)Math.max(0.0F, Math.min(1.0F, (float)var0 / (float)var1)):1.0D;
      if(var3 > 0.0D && var3 < 1.0D) {
         double var5;
         double var7;
         switch(var2) {
         case 0:
            return var3;
         case 1:
            return 1.0D - Math.cos(3.141592653589793D * var3 / 2.0D);
         case 2:
            return Math.sin(var3 * 3.141592653589793D / 2.0D);
         case 3:
            return -(Math.cos(3.141592653589793D * var3) - 1.0D) / 2.0D;
         case 4:
            return var3 * var3;
         case 5:
            return 1.0D - (1.0D - var3) * (1.0D - var3);
         case 6:
            return var3 < 0.5D?2.0D * var3 * var3:1.0D - Math.pow(var3 * -2.0D + 2.0D, 2.0D) / 2.0D;
         case 7:
            return var3 * var3 * var3;
         case 8:
            return 1.0D - Math.pow(1.0D - var3, 3.0D);
         case 9:
            return var3 < 0.5D?var3 * 4.0D * var3 * var3:1.0D - Math.pow(2.0D + -2.0D * var3, 3.0D) / 2.0D;
         case 10:
            return var3 * var3 * var3 * var3;
         case 11:
            return 1.0D - Math.pow(1.0D - var3, 4.0D);
         case 12:
            return var3 < 0.5D?var3 * var3 * var3 * 8.0D * var3:1.0D - Math.pow(2.0D + -2.0D * var3, 4.0D) / 2.0D;
         case 13:
            return var3 * var3 * var3 * var3 * var3;
         case 14:
            return 1.0D - Math.pow(1.0D - var3, 5.0D);
         case 15:
            return var3 < 0.5D?var3 * var3 * var3 * 8.0D * var3 * var3:1.0D - Math.pow(var3 * -2.0D + 2.0D, 5.0D) / 2.0D;
         case 16:
            return Math.pow(2.0D, 10.0D * var3 - 10.0D);
         case 17:
            return 1.0D - Math.pow(2.0D, -10.0D * var3);
         case 18:
            return var3 < 0.5D?Math.pow(2.0D, 10.0D + var3 * 20.0D) / 2.0D:(2.0D - Math.pow(2.0D, var3 * -20.0D + 10.0D)) / 2.0D;
         case 19:
            return 1.0D - Math.sqrt(1.0D - Math.pow(var3, 2.0D));
         case 20:
            return Math.sqrt(1.0D - Math.pow(var3 - 1.0D, 2.0D));
         case 21:
            return var3 < 0.5D?(1.0D - Math.sqrt(1.0D - Math.pow(var3 * 2.0D, 2.0D))) / 2.0D:(Math.sqrt(1.0D - Math.pow(-2.0D * var3 + 2.0D, 2.0D)) + 1.0D) / 2.0D;
         case 22:
            var5 = 1.70158D;
            var7 = 2.70158D;
            return var3 * var3 * 2.70158D * var3 - 1.70158D * var3 * var3;
         case 23:
            var5 = 1.70158D;
            var7 = 2.70158D;
            return 1.0D + 2.70158D * Math.pow(var3 - 1.0D, 3.0D) + 1.70158D * Math.pow(var3 - 1.0D, 2.0D);
         case 24:
            var5 = 1.70158D;
            var7 = 2.5949095D;
            return var3 < 0.5D?Math.pow(var3 * 2.0D, 2.0D) * (7.189819D * var3 - 2.5949095D) / 2.0D:(Math.pow(var3 * 2.0D - 2.0D, 2.0D) * (3.5949095D * (2.0D * var3 - 2.0D) + 2.5949095D) + 2.0D) / 2.0D;
         case 25:
            var5 = 2.0943951023931953D;
            return -Math.pow(2.0D, var3 * 10.0D - 10.0D) * Math.sin(2.0943951023931953D * (10.0D * var3 - 10.75D));
         case 26:
            var5 = 2.0943951023931953D;
            return Math.pow(2.0D, -10.0D * var3) * Math.sin((var3 * 10.0D - 0.75D) * 2.0943951023931953D) + 1.0D;
         case 27:
            var5 = 1.3962634015954636D;
            var7 = Math.sin((20.0D * var3 - 11.125D) * 1.3962634015954636D);
            return var3 < 0.5D?-(Math.pow(2.0D, var3 * 20.0D - 10.0D) * var7) / 2.0D:Math.pow(2.0D, 10.0D + -20.0D * var3) * var7 / 2.0D + 1.0D;
         default:
            return var3;
         }
      } else {
         return var3 <= 0.0D?0.0D:1.0D;
      }
   }
}
