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

// Token: 0x02000237 RID: 567
[Token(Token = "0x2000237")]
public class UISavePointMenu : GameCanvasBase
{
	// Token: 0x060015B1 RID: 5553 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60015B1")]
	[Address(RVA = "0x538C10", Offset = "0x537A10", VA = "0x180538C10")]
	public void SetSavePointData(SavePoint data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060015B2 RID: 5554 RVA: 0x00031A50 File Offset: 0x0002FC50
	[Token(Token = "0x60015B2")]
	[Address(RVA = "0x189B180", Offset = "0x1899F80", VA = "0x18189B180", Slot = "11")]
	public override void Init()
	{
		UILabelHandler[] array = this.handlers;
		int num = 0;
		if (num < array.Length)
		{
			array[num].index = num;
			UILabelHandler uilabelHandler = this.handlers[num];
			Action<UIHandlerBase> action = new Action(this.OnHandlerSelected);
			uilabelHandler.onSelectedHandler = action;
			UILabelHandler uilabelHandler2 = this.handlers[num];
			Action<UIHandlerBase> action2 = new Action(this.OnHandlerDeselected);
			uilabelHandler2.onDeselectedHandler = action2;
			UILabelHandler[] array2 = this.handlers;
			num++;
		}
		bool showTeleportMenu = Game.GameSave.basic.showTeleportMenu;
		this.showTeleportButton = showTeleportMenu;
		GameObject gameObject = this.handlers[2].gameObject;
		bool flag = this.showTeleportButton;
		gameObject.SetActive(flag);
		UILabelHandler[] array3 = this.handlers;
		this.showSkinButton = true;
		GameObject gameObject2 = array3[3].gameObject;
		bool flag2 = this.showSkinButton;
		gameObject2.SetActive(flag2);
		this.UpdateHandlerNavigation();
		UINavigator navigator = this.navigator;
		UILabelHandler[] array4 = this.handlers;
		navigator.BindPointerEnterEvent(array4);
		UINavigator navigator2 = this.navigator;
		UILabelHandler[] array5 = this.handlers;
		navigator2.BindPointerExitEvent(array5);
	}

	// Token: 0x060015B3 RID: 5555 RVA: 0x00031B7C File Offset: 0x0002FD7C
	[Token(Token = "0x60015B3")]
	[Address(RVA = "0x189B0E0", Offset = "0x1899EE0", VA = "0x18189B0E0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		if (this.NeedUpdateNavigation())
		{
			this.UpdateHandlerNavigation();
		}
		UILabelHandler[] array = this.handlers;
		UINavigator navigator = this.navigator;
		UILabelHandler uilabelHandler = array[0];
		navigator.SetDefaultHandler(uilabelHandler);
		GameObject gameObject = this.submissionEffect.gameObject;
		int num = 0;
		gameObject.SetActive(num != 0);
		base.Appear(completeHandler);
	}

	// Token: 0x060015B4 RID: 5556 RVA: 0x00031BDC File Offset: 0x0002FDDC
	[Token(Token = "0x60015B4")]
	[Address(RVA = "0x189B750", Offset = "0x189A550", VA = "0x18189B750")]
	private bool NeedUpdateNavigation()
	{
		GameSaveBasicData basic = Game.GameSave.basic;
		UILabelHandler[] array = this.handlers;
		bool showTeleportMenu = basic.showTeleportMenu;
		this.showTeleportButton = showTeleportMenu;
		bool activeSelf = array[2].gameObject.activeSelf;
		if (showTeleportMenu != activeSelf)
		{
			GameObject gameObject = this.handlers[2].gameObject;
			bool flag = this.showTeleportButton;
			gameObject.SetActive(flag);
		}
		UILabelHandler[] array2 = this.handlers;
		this.showSkinButton = true;
		if (!array2[3].gameObject.activeSelf)
		{
			GameObject gameObject2 = this.handlers[3].gameObject;
			bool flag2 = this.showSkinButton;
			gameObject2.SetActive(flag2);
		}
		return true;
	}

	// Token: 0x060015B5 RID: 5557 RVA: 0x00031C9C File Offset: 0x0002FE9C
	[Token(Token = "0x60015B5")]
	[Address(RVA = "0x764EC0", Offset = "0x763CC0", VA = "0x180764EC0", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x060015B6 RID: 5558 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60015B6")]
	[Address(RVA = "0x189BAA0", Offset = "0x189A8A0", VA = "0x18189BAA0", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060015B7 RID: 5559 RVA: 0x00031CBC File Offset: 0x0002FEBC
	[Token(Token = "0x60015B7")]
	[Address(RVA = "0x189B480", Offset = "0x189A280", VA = "0x18189B480", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		Text text = this.title;
		string text2 = data.systemText.GetText(179);
		text.text = text2;
		UILabelHandler[] array = this.handlers;
		GameTextData systemText = data.systemText;
		UILabelHandler uilabelHandler = array[0];
		string text3 = systemText.GetText(180);
		uilabelHandler.SetLabel(text3);
		UILabelHandler[] array2 = this.handlers;
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler2 = array2[1];
		string text4 = systemText2.GetText(181);
		uilabelHandler2.SetLabel(text4);
		UILabelHandler[] array3 = this.handlers;
		GameTextData systemText3 = data.systemText;
		UILabelHandler uilabelHandler3 = array3[2];
		string text5 = systemText3.GetText(178);
		uilabelHandler3.SetLabel(text5);
		UILabelHandler[] array4 = this.handlers;
		GameTextData systemText4 = data.systemText;
		UILabelHandler uilabelHandler4 = array4[3];
		string text6 = systemText4.GetText(182);
		uilabelHandler4.SetLabel(text6);
		UILabelHandler[] array5 = this.handlers;
		GameTextData systemText5 = data.systemText;
		UILabelHandler uilabelHandler5 = array5[4];
		string text7 = systemText5.GetText(183);
		uilabelHandler5.SetLabel(text7);
		GameFontPack fontPack = data.fontPack;
		Text text8 = this.title;
		Font medium = fontPack.medium;
		text8.font = medium;
		UILabelHandler[] array6 = this.handlers;
		int num = 0;
		int length = array6.Length;
		if (num < length)
		{
			GameFontPack fontPack2 = data.fontPack;
			UILabelHandler uilabelHandler6 = array6[num];
			Font medium2 = fontPack2.medium;
			uilabelHandler6.SetFont(medium2);
			num++;
		}
	}

	// Token: 0x060015B8 RID: 5560 RVA: 0x00031E48 File Offset: 0x00030048
	[Token(Token = "0x60015B8")]
	[Address(RVA = "0x189B930", Offset = "0x189A730", VA = "0x18189B930")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.UpdatePos(anchoredPosition);
		UILabelHandler[] array = this.handlers;
		UINavigationEffect uinavigationEffect2 = this.navigationEffect;
		int index = handler.index;
		UILabelHandler uilabelHandler = array[index];
		uinavigationEffect2.UpdateArrowPos(uilabelHandler);
		this.navigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x060015B9 RID: 5561 RVA: 0x00031EB0 File Offset: 0x000300B0
	[Token(Token = "0x60015B9")]
	[Address(RVA = "0x76AA60", Offset = "0x769860", VA = "0x18076AA60")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x060015BA RID: 5562 RVA: 0x00031ED0 File Offset: 0x000300D0
	[Token(Token = "0x60015BA")]
	[Address(RVA = "0x10246B0", Offset = "0x10234B0", VA = "0x1810246B0")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.submissionEffect.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.submissionEffect.gameObject.SetActive(true);
	}

	// Token: 0x060015BB RID: 5563 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60015BB")]
	[Address(RVA = "0x189C0B0", Offset = "0x189AEB0", VA = "0x18189C0B0")]
	private void UpdateHandlerNavigation()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060015BC RID: 5564 RVA: 0x00031F20 File Offset: 0x00030120
	[Token(Token = "0x60015BC")]
	[Address(RVA = "0x189BA30", Offset = "0x189A830", VA = "0x18189BA30")]
	private bool ShowTeleportButton()
	{
		return Game.GameSave.basic.showTeleportMenu;
	}

	// Token: 0x060015BD RID: 5565 RVA: 0x00031F44 File Offset: 0x00030144
	[Token(Token = "0x60015BD")]
	[Address(RVA = "0x454840", Offset = "0x453640", VA = "0x180454840")]
	private bool ShowSkinButton()
	{
		return true;
	}

	// Token: 0x060015BE RID: 5566 RVA: 0x00031F54 File Offset: 0x00030154
	[Token(Token = "0x60015BE")]
	[Address(RVA = "0x769BF0", Offset = "0x7689F0", VA = "0x180769BF0")]
	public UISavePointMenu()
	{
	}

	// Token: 0x040020D1 RID: 8401
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40020D1")]
	[SerializeField]
	private Text title;

	// Token: 0x040020D2 RID: 8402
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40020D2")]
	[SerializeField]
	private GridLayoutGroup layoutGroup;

	// Token: 0x040020D3 RID: 8403
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40020D3")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x040020D4 RID: 8404
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40020D4")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x040020D5 RID: 8405
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40020D5")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x040020D6 RID: 8406
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40020D6")]
	private SavePoint currentSavePointData;

	// Token: 0x040020D7 RID: 8407
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40020D7")]
	private bool showTeleportButton;

	// Token: 0x040020D8 RID: 8408
	[FieldOffset(Offset = "0x89")]
	[Token(Token = "0x40020D8")]
	private bool showSkinButton;
}
