using System;
using Cpp2IlInjected;
using MarsSDK;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x0200022D RID: 557
[Token(Token = "0x200022D")]
public class UIHistory : GameCanvasBase
{
	// Token: 0x06001562 RID: 5474 RVA: 0x00030568 File Offset: 0x0002E768
	[Token(Token = "0x6001562")]
	[Address(RVA = "0x76A610", Offset = "0x769410", VA = "0x18076A610", Slot = "11")]
	public override void Init()
	{
		UINavigator navigator2;
		UIHandlerBase[] array2;
		UILabelHandler uilabelHandler4;
		for (;;)
		{
			UILabelHandler uilabelHandler = this.confirmHandler;
			Action<UIHandlerBase> action = new Action(this.OnHandlerSelected);
			uilabelHandler.onSelectedHandler = action;
			UILabelHandler uilabelHandler2 = this.confirmHandler;
			Action<UIHandlerBase> action2 = new Action(this.OnHandlerDeselected);
			uilabelHandler2.onDeselectedHandler = action2;
			UINavigator navigator = this.navigator;
			UIHandlerBase[] array = new UIHandlerBase[1];
			UILabelHandler uilabelHandler3 = this.confirmHandler;
			if (uilabelHandler3 == 0 || array != 0)
			{
				array[0] = uilabelHandler3;
				navigator.BindPointerEnterEvent(array);
				navigator2 = this.navigator;
				array2 = new UIHandlerBase[1];
				uilabelHandler4 = this.confirmHandler;
				if (uilabelHandler4 == 0 || array2 != 0)
				{
					break;
				}
			}
		}
		array2[0] = uilabelHandler4;
		navigator2.BindPointerExitEvent(array2);
	}

	// Token: 0x06001563 RID: 5475 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001563")]
	[Address(RVA = "0x769CE0", Offset = "0x768AE0", VA = "0x180769CE0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001564 RID: 5476 RVA: 0x00030620 File Offset: 0x0002E820
	[Token(Token = "0x6001564")]
	[Address(RVA = "0x76AA30", Offset = "0x769830", VA = "0x18076AA30", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		UINavigator navigator = this.navigator;
		UILabelHandler uilabelHandler = this.confirmHandler;
		navigator.SetDefaultHandler(uilabelHandler);
	}

	// Token: 0x06001565 RID: 5477 RVA: 0x00030648 File Offset: 0x0002E848
	[Token(Token = "0x6001565")]
	[Address(RVA = "0x76AA80", Offset = "0x769880", VA = "0x18076AA80")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		this.navigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001566 RID: 5478 RVA: 0x0003066C File Offset: 0x0002E86C
	[Token(Token = "0x6001566")]
	[Address(RVA = "0x76AA60", Offset = "0x769860", VA = "0x18076AA60")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x06001567 RID: 5479 RVA: 0x0003068C File Offset: 0x0002E88C
	[Token(Token = "0x6001567")]
	[Address(RVA = "0x76AAF0", Offset = "0x7698F0", VA = "0x18076AAF0", Slot = "21")]
	public override void Submit()
	{
		if (this.navigator.currentHandler)
		{
			base.Close();
			this.submissionEffect.gameObject.SetActive(true);
			Game.PlayHandlerSE(UIHandlerSFX.Submit);
			Game.PlayHandlerScaleEffect(this.confirmHandler);
			return;
		}
	}

	// Token: 0x06001568 RID: 5480 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001568")]
	[Address(RVA = "0x76A4B0", Offset = "0x7692B0", VA = "0x18076A4B0")]
	private string GetPlayingTimeValue()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001569 RID: 5481 RVA: 0x000306DC File Offset: 0x0002E8DC
	[Token(Token = "0x6001569")]
	[Address(RVA = "0x76A450", Offset = "0x769250", VA = "0x18076A450")]
	private string GetNumberValue(int value)
	{
		return string.Format("{0:N0}", "{0:N0}");
	}

	// Token: 0x0600156A RID: 5482 RVA: 0x000306F8 File Offset: 0x0002E8F8
	[Token(Token = "0x600156A")]
	[Address(RVA = "0x76A830", Offset = "0x769630", VA = "0x18076A830", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		Text text = this.title;
		string text2 = data.systemText.GetText(340);
		text.text = text2;
		GameFontPack fontPack = data.fontPack;
		Text text3 = this.title;
		Font light = fontPack.light;
		text3.font = light;
		UIHistoryHandler[] array = this.topHandlers;
		int num = 0;
		if (num < array.Length)
		{
			UIHistoryHandler uihistoryHandler = array[num];
			GameTextData systemText = data.systemText;
			Text label = uihistoryHandler.label;
			string text4 = systemText.GetText(341);
			label.text = text4;
			GameFontPack fontPack2 = data.fontPack;
			Text label2 = uihistoryHandler.label;
			Font regular = fontPack2.regular;
			label2.font = regular;
			GameFontPack fontPack3 = data.fontPack;
			Text content = uihistoryHandler.content;
			Font light2 = fontPack3.light;
			content.font = light2;
			UIHistoryHandler[] array2 = this.topHandlers;
			num++;
		}
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler = this.confirmHandler;
		string text5 = systemText2.GetText(16);
		uilabelHandler.SetLabel(text5);
		GameFontPack fontPack4 = data.fontPack;
		UILabelHandler uilabelHandler2 = this.confirmHandler;
		Font medium = fontPack4.medium;
		uilabelHandler2.SetFont(medium);
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		UILabelHandler uilabelHandler3 = this.confirmHandler;
		uinavigationEffect.UpdateArrowPos(uilabelHandler3);
	}

	// Token: 0x0600156B RID: 5483 RVA: 0x00030848 File Offset: 0x0002EA48
	[Token(Token = "0x600156B")]
	[Address(RVA = "0x769BF0", Offset = "0x7689F0", VA = "0x180769BF0")]
	public UIHistory()
	{
	}

	// Token: 0x040020AB RID: 8363
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40020AB")]
	[SerializeField]
	private Text title;

	// Token: 0x040020AC RID: 8364
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40020AC")]
	[SerializeField]
	private UIHistoryHandler[] topHandlers;

	// Token: 0x040020AD RID: 8365
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40020AD")]
	[SerializeField]
	private UILabelHandler confirmHandler;

	// Token: 0x040020AE RID: 8366
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40020AE")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x040020AF RID: 8367
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40020AF")]
	[SerializeField]
	private Image submissionEffect;
}
