using System;
using System.Text.RegularExpressions;
using System.Xml;
using Cpp2IlInjected;
using MarsSDK;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000231 RID: 561
[Token(Token = "0x2000231")]
public class UIMagicStatsHandler : UIHandlerBase
{
	// Token: 0x170000D8 RID: 216
	// (get) Token: 0x06001583 RID: 5507 RVA: 0x000311BC File Offset: 0x0002F3BC
	[Token(Token = "0x170000D8")]
	public string Description
	{
		[Token(Token = "0x6001583")]
		[Address(RVA = "0x475460", Offset = "0x474260", VA = "0x180475460")]
		get
		{
			return this.description;
		}
	}

	// Token: 0x06001584 RID: 5508 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001584")]
	[Address(RVA = "0x101F930", Offset = "0x101E730", VA = "0x18101F930")]
	public void UpdateContent()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001585 RID: 5509 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001585")]
	[Address(RVA = "0x101EE30", Offset = "0x101DC30", VA = "0x18101EE30")]
	private ValueTuple<int, bool> GetData()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001586 RID: 5510 RVA: 0x000311D0 File Offset: 0x0002F3D0
	[Token(Token = "0x6001586")]
	[Address(RVA = "0x101FCB0", Offset = "0x101EAB0", VA = "0x18101FCB0")]
	private void UpdateTitleText()
	{
		if (this.level == 5)
		{
			string text = Game.<UISystemText>k__BackingField.GetText(322);
		}
		string text2 = Game.<UISystemText>k__BackingField.GetText(321);
		int num = this.level;
		string text3 = string.Format("{0}{1}", text2, text2);
		Text text4 = this.label;
		string text5 = this.GetTitleText() + "\n<size=18>" + text3 + "</size>";
		bool dtdValidation = ((IDtdParserAdapterWithValidation)text4).DtdValidation;
	}

	// Token: 0x06001587 RID: 5511 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001587")]
	[Address(RVA = "0x101F510", Offset = "0x101E310", VA = "0x18101F510")]
	private string GetTitleText()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001588 RID: 5512 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001588")]
	[Address(RVA = "0x101FB70", Offset = "0x101E970", VA = "0x18101FB70")]
	private void UpdateTipIcon(bool showIcon)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001589 RID: 5513 RVA: 0x0003124C File Offset: 0x0002F44C
	[Token(Token = "0x6001589")]
	[Address(RVA = "0x101FAE0", Offset = "0x101E8E0", VA = "0x18101FAE0")]
	private void UpdateDescription()
	{
		Regex regex = this.regex;
		string text = this.GetDescription().Trim();
		string text2 = regex.Replace(text, "\n");
		this.description = text2;
		throw new NullReferenceException();
	}

	// Token: 0x0600158A RID: 5514 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600158A")]
	[Address(RVA = "0x101F1D0", Offset = "0x101DFD0", VA = "0x18101F1D0")]
	private string GetDescription()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600158B RID: 5515 RVA: 0x00031288 File Offset: 0x0002F488
	[Token(Token = "0x600158B")]
	[Address(RVA = "0x101F860", Offset = "0x101E660", VA = "0x18101F860")]
	public void Localize(GameFontPack fontPack)
	{
		Text text = this.label;
		Font regular = fontPack.regular;
		text.font = regular;
	}

	// Token: 0x0600158C RID: 5516 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600158C")]
	[Address(RVA = "0x101F830", Offset = "0x101E630", VA = "0x18101F830")]
	public float GetWidth()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600158D RID: 5517 RVA: 0x000312B0 File Offset: 0x0002F4B0
	[Token(Token = "0x600158D")]
	[Address(RVA = "0x101F8E0", Offset = "0x101E6E0", VA = "0x18101F8E0", Slot = "8")]
	public override void OnSelect()
	{
		Action<UIHandlerBase> onSelectedHandler = this.onSelectedHandler;
		if (onSelectedHandler != 0)
		{
			onSelectedHandler(this);
			return;
		}
	}

	// Token: 0x0600158E RID: 5518 RVA: 0x000312D0 File Offset: 0x0002F4D0
	[Token(Token = "0x600158E")]
	[Address(RVA = "0x101F890", Offset = "0x101E690", VA = "0x18101F890", Slot = "9")]
	public override void OnDeselect()
	{
		Action<UIHandlerBase> onDeselectedHandler = this.onDeselectedHandler;
		if (onDeselectedHandler != 0)
		{
			onDeselectedHandler(this);
			return;
		}
	}

	// Token: 0x0600158F RID: 5519 RVA: 0x000312F0 File Offset: 0x0002F4F0
	[Token(Token = "0x600158F")]
	[Address(RVA = "0x101FEF0", Offset = "0x101ECF0", VA = "0x18101FEF0")]
	public UIMagicStatsHandler()
	{
		Regex regex = new Regex("\\n\\s*\\n");
		this.regex = regex;
		base..ctor();
	}

	// Token: 0x040020BE RID: 8382
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40020BE")]
	[SerializeField]
	private Image tipIcon;

	// Token: 0x040020BF RID: 8383
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40020BF")]
	[SerializeField]
	private Text label;

	// Token: 0x040020C0 RID: 8384
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40020C0")]
	private int level;

	// Token: 0x040020C1 RID: 8385
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40020C1")]
	private string description;

	// Token: 0x040020C2 RID: 8386
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40020C2")]
	private Regex regex;
}
