package mapped;

import net.runelite.api.FriendsChatRank;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSClanMate;

@ObfuscatedName("rp")
public class ClanMate extends Buddy implements RSClanMate {
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "Lrw;"
   )
   TriBool friend;
   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "Lrw;"
   )
   TriBool ignored;

   ClanMate() {
      this.friend = TriBool.TriBool_unknown;
      this.ignored = TriBool.TriBool_unknown;
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(S)V",
      garbageValue = "-19628"
   )
   void clearIsFriend_base() {
      this.friend = TriBool.TriBool_unknown;
   }

   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "-1857487386"
   )
   public final boolean isFriend_base() {
      if(this.friend == TriBool.TriBool_unknown) {
         this.fillIsFriend_base();
      }

      return this.friend == TriBool.TriBool_true;
   }

   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-711176995"
   )
   void fillIsFriend_base() {
      this.friend = class12.friendSystem.friendsList.method8182(super.username)?TriBool.TriBool_true:TriBool.TriBool_false;
   }

   @ObfuscatedName("ab")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "66"
   )
   void clearIsIgnored_base() {
      this.ignored = TriBool.TriBool_unknown;
   }

   @ObfuscatedName("al")
   @ObfuscatedSignature(
      descriptor = "(S)Z",
      garbageValue = "-21149"
   )
   public final boolean isIgnored_base() {
      if(this.ignored == TriBool.TriBool_unknown) {
         this.fillIsIgnored_base();
      }

      return this.ignored == TriBool.TriBool_true;
   }

   @ObfuscatedName("ax")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "1915523322"
   )
   void fillIsIgnored_base() {
      this.ignored = class12.friendSystem.ignoreList.method8182(super.username)?TriBool.TriBool_true:TriBool.TriBool_false;
   }

   public FriendsChatRank getRank() {
      return FriendsChatRank.valueOf(this.getRSRank());
   }
}
