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

// Token: 0x0200027C RID: 636
[Token(Token = "0x200027C")]
public class UIPauseMenu : GameCanvasBase
{
	// Token: 0x060017A9 RID: 6057 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017A9")]
	[Address(RVA = "0xE7F2E0", Offset = "0xE7E2E0", VA = "0x180E7F2E0", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017AA RID: 6058 RVA: 0x00036218 File Offset: 0x00034418
	[Token(Token = "0x60017AA")]
	[Address(RVA = "0xE7F060", Offset = "0xE7E060", VA = "0x180E7F060", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		if (this.NeedUpdateNavigation())
		{
			this.UpdateHandlerNavigation();
		}
		Action action = delegate
		{
			Game.SwitchUIControlInput();
			Game.PauseVibration();
			Action completeHandler2 = completeHandler;
			if (completeHandler2 != 0)
			{
				completeHandler2();
				return;
			}
		};
		this.AppearRootCanvas(action);
	}

	// Token: 0x060017AB RID: 6059 RVA: 0x0003625C File Offset: 0x0003445C
	[Token(Token = "0x60017AB")]
	[Address(RVA = "0xE7FAC0", Offset = "0xE7EAC0", VA = "0x180E7FAC0")]
	private bool NeedUpdateNavigation()
	{
		GameSaveBasicData basic = Game.GameSave.basic;
		UILabelHandler[] array = this.handlers;
		bool flag = basic.difficulty != GameDifficulty.BossRush;
		this.showValuablesButton = flag;
		bool activeSelf = array[2].gameObject.activeSelf;
		if (flag != activeSelf)
		{
			GameObject gameObject = this.handlers[2].gameObject;
			bool flag2 = this.showValuablesButton;
			gameObject.SetActive(flag2);
		}
		GameSaveBasicData basic2 = Game.GameSave.basic;
		UILabelHandler[] array2 = this.handlers;
		bool flag3 = basic2.difficulty != GameDifficulty.BossRush;
		this.showSavePointButton = flag3;
		bool activeSelf2 = array2[5].gameObject.activeSelf;
		if (flag3 != activeSelf2)
		{
			GameObject gameObject2 = this.handlers[5].gameObject;
			bool flag4 = this.showSavePointButton;
			gameObject2.SetActive(flag4);
		}
		return true;
	}

	// Token: 0x060017AC RID: 6060 RVA: 0x00036348 File Offset: 0x00034548
	[Token(Token = "0x60017AC")]
	[Address(RVA = "0xE7F210", Offset = "0xE7E210", VA = "0x180E7F210", Slot = "13")]
	protected override void Hide(Action completeHandler)
	{
		Action action = delegate
		{
			Game.SwitchGameplayInput();
			Game.ResumeVibration();
			Action completeHandler2 = completeHandler;
			if (completeHandler2 != 0)
			{
				completeHandler2();
			}
			this.OnMainPauseMenuAppeared();
		};
		this.HideRootCanvas(action);
	}

	// Token: 0x060017AD RID: 6061 RVA: 0x00036384 File Offset: 0x00034584
	[Token(Token = "0x60017AD")]
	[Address(RVA = "0x94CB50", Offset = "0x94BB50", VA = "0x18094CB50", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x060017AE RID: 6062 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017AE")]
	[Address(RVA = "0xE80750", Offset = "0xE7F750", VA = "0x180E80750", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017AF RID: 6063 RVA: 0x000363A4 File Offset: 0x000345A4
	[Token(Token = "0x60017AF")]
	[Address(RVA = "0xE7F730", Offset = "0xE7E730", VA = "0x180E7F730", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		Text text = this.title;
		string text2 = data.systemText.GetText(1);
		text.text = text2;
		UILabelHandler[] array = this.handlers;
		GameTextData systemText = data.systemText;
		UILabelHandler uilabelHandler = array[0];
		string text3 = systemText.GetText(2);
		uilabelHandler.SetLabel(text3);
		UILabelHandler[] array2 = this.handlers;
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler2 = array2[1];
		string text4 = systemText2.GetText(5);
		uilabelHandler2.SetLabel(text4);
		UILabelHandler[] array3 = this.handlers;
		GameTextData systemText3 = data.systemText;
		UILabelHandler uilabelHandler3 = array3[2];
		string text5 = systemText3.GetText(11);
		uilabelHandler3.SetLabel(text5);
		UILabelHandler[] array4 = this.handlers;
		GameTextData systemText4 = data.systemText;
		UILabelHandler uilabelHandler4 = array4[3];
		string text6 = systemText4.GetText(3);
		uilabelHandler4.SetLabel(text6);
		UILabelHandler[] array5 = this.handlers;
		GameTextData systemText5 = data.systemText;
		UILabelHandler uilabelHandler5 = array5[4];
		string text7 = systemText5.GetText(340);
		uilabelHandler5.SetLabel(text7);
		UILabelHandler[] array6 = this.handlers;
		GameTextData systemText6 = data.systemText;
		UILabelHandler uilabelHandler6 = array6[5];
		string text8 = systemText6.GetText(6);
		uilabelHandler6.SetLabel(text8);
		UILabelHandler[] array7 = this.handlers;
		GameTextData systemText7 = data.systemText;
		UILabelHandler uilabelHandler7 = array7[6];
		string text9 = systemText7.GetText(4);
		uilabelHandler7.SetLabel(text9);
		GameFontPack fontPack = data.fontPack;
		Text text10 = this.title;
		Font light = fontPack.light;
		text10.font = light;
		UILabelHandler[] array8 = this.handlers;
		int num = 0;
		int length = array8.Length;
		if (num < length)
		{
			GameFontPack fontPack2 = data.fontPack;
			Text label = array8[num].label;
			Font medium = fontPack2.medium;
			label.font = medium;
			num++;
		}
	}

	// Token: 0x060017B0 RID: 6064 RVA: 0x0003657C File Offset: 0x0003477C
	[Token(Token = "0x60017B0")]
	[Address(RVA = "0xE7FE60", Offset = "0xE7EE60", VA = "0x180E7FE60")]
	private void OnMainPauseMenuAppeared()
	{
		Game.MoveBackgroundDown();
		Game.SetHideMoneyFlag(false);
	}

	// Token: 0x060017B1 RID: 6065 RVA: 0x00036598 File Offset: 0x00034798
	[Token(Token = "0x60017B1")]
	[Address(RVA = "0xE7FEC0", Offset = "0xE7EEC0", VA = "0x180E7FEC0")]
	private void OnSubPauseMenuAppeared()
	{
		Game.MoveBackgroundUp();
		Game.SetHideMoneyFlag(true);
	}

	// Token: 0x060017B2 RID: 6066 RVA: 0x000365B4 File Offset: 0x000347B4
	[Token(Token = "0x60017B2")]
	[Address(RVA = "0xE7EFA0", Offset = "0xE7DFA0", VA = "0x180E7EFA0")]
	private void AppearRootCanvas(Action completeHandler)
	{
		this.currentNavigatorIndex = (int)((ulong)0L);
		Game.MoveBackgroundDown();
		Game.SetHideMoneyFlag(false);
		UILabelHandler[] array = this.handlers;
		UINavigator navigator = this.navigator;
		UILabelHandler uilabelHandler = array[0];
		navigator.SetDefaultHandler(uilabelHandler);
		this.UpdateInteractionIconStatus();
		base.Appear(completeHandler);
	}

	// Token: 0x060017B3 RID: 6067 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017B3")]
	[Address(RVA = "0xE7F140", Offset = "0xE7E140", VA = "0x180E7F140")]
	private void HideRootCanvas([Optional] Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017B4 RID: 6068 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017B4")]
	[Address(RVA = "0xB0F870", Offset = "0xB0E870", VA = "0x180B0F870")]
	private void OpenCanvas<T>(Action closeHandler) where T : GameCanvasBase
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017B5 RID: 6069 RVA: 0x00036608 File Offset: 0x00034808
	[Token(Token = "0x60017B5")]
	[Address(RVA = "0xE7FF20", Offset = "0xE7EF20", VA = "0x180E7FF20")]
	private void OpenMsgBox(string titleText, Action confirmHandler, int defaultHandlerIndex = 0)
	{
		MessageBoxConfig messageBoxConfig;
		MessageBoxHandlerData[] array;
		MessageBoxHandlerData messageBoxHandlerData2;
		for (;;)
		{
			UIMessageBox messageBox2 = Game.GetMessageBox(MessageBoxStyle.Universal);
			UIMessageBox messageBox = messageBox2;
			messageBoxConfig = new MessageBoxConfig(titleText, defaultHandlerIndex);
			array = new MessageBoxHandlerData[2];
			string text = Game.<UISystemText>k__BackingField.GetText(13);
			Action action = delegate
			{
				messageBox.ClearCloseEvent();
				messageBox.Close();
				Action confirmHandler2 = confirmHandler;
				if (confirmHandler2 != 0)
				{
					confirmHandler2();
					return;
				}
			};
			UIHandlerSFX uihandlerSFX;
			MessageBoxHandlerData messageBoxHandlerData = new MessageBoxHandlerData(text, uihandlerSFX, action);
			if (messageBoxHandlerData == 0 || messageBoxHandlerData != 0)
			{
				array[0] = messageBoxHandlerData;
				string text2 = Game.<UISystemText>k__BackingField.GetText(14);
				Action action2 = new Action(messageBox.Close);
				UICanvasSFX uicanvasSFX;
				messageBoxHandlerData2 = new MessageBoxHandlerData(text2, uicanvasSFX, action2);
				if (messageBoxHandlerData2 == 0 || messageBoxHandlerData2 != 0)
				{
					break;
				}
			}
		}
		array[1] = messageBoxHandlerData2;
		MessageBoxConfig messageBoxConfig2 = messageBoxConfig.BindHandlerData(array);
		Action action3 = delegate
		{
			UIPauseMenu <>4__this = CS$<>8__locals1.<>4__this;
			int num = 0;
			<>4__this.AppearRootCanvas(num);
		};
		MessageBoxConfig messageBoxConfig3 = messageBoxConfig2.BindCloseEvent(action3);
		CS$<>8__locals1.messageBox.OpenMsgBox(messageBoxConfig3);
	}

	// Token: 0x060017B6 RID: 6070 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017B6")]
	[Address(RVA = "0xE80470", Offset = "0xE7F470", VA = "0x180E80470")]
	private void ReloadStage()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017B7 RID: 6071 RVA: 0x000366FC File Offset: 0x000348FC
	[Token(Token = "0x60017B7")]
	[Address(RVA = "0xE7FD50", Offset = "0xE7ED50", VA = "0x180E7FD50")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		RectTransform root = this.navigationEffect.root;
		RectTransform rectTransform = handler.rectTransform;
		root.parentInternal = rectTransform;
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		Vector2 zero = Vector2.zero;
		uinavigationEffect.root.anchoredPosition = zero;
		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: 0x060017B8 RID: 6072 RVA: 0x00036784 File Offset: 0x00034984
	[Token(Token = "0x60017B8")]
	[Address(RVA = "0xE7FD00", Offset = "0xE7ED00", VA = "0x180E7FD00")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		int index = this.navigator.currentHandler.index;
		if (handler.index == index)
		{
			this.navigationEffect.Hide();
			return;
		}
	}

	// Token: 0x060017B9 RID: 6073 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017B9")]
	[Address(RVA = "0xE811A0", Offset = "0xE801A0", VA = "0x180E811A0")]
	private void UpdateInteractionIconStatus()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BA RID: 6074 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BA")]
	[Address(RVA = "0xE805D0", Offset = "0xE7F5D0", VA = "0x180E805D0")]
	private void ResetInteractionIconStatus()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BB RID: 6075 RVA: 0x000367C0 File Offset: 0x000349C0
	[Token(Token = "0x60017BB")]
	[Address(RVA = "0xE80380", Offset = "0xE7F380", VA = "0x180E80380")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.submissionEffect.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.submissionEffect.gameObject.SetActive(true);
		Game.PlayHandlerScaleEffect(this.navigator.currentHandler);
	}

	// Token: 0x060017BC RID: 6076 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BC")]
	[Address(RVA = "0xE80F40", Offset = "0xE7FF40", VA = "0x180E80F40")]
	private void UpdateHandlerNavigation()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BD RID: 6077 RVA: 0x00036820 File Offset: 0x00034A20
	[Token(Token = "0x60017BD")]
	[Address(RVA = "0xE806E0", Offset = "0xE7F6E0", VA = "0x180E806E0")]
	private bool ShowValuablesButton()
	{
		return Game.GameSave.basic.difficulty != GameDifficulty.BossRush;
	}

	// Token: 0x060017BE RID: 6078 RVA: 0x0003684C File Offset: 0x00034A4C
	[Token(Token = "0x60017BE")]
	[Address(RVA = "0xE80670", Offset = "0xE7F670", VA = "0x180E80670")]
	private bool ShowSavePointButton()
	{
		return Game.GameSave.basic.difficulty != GameDifficulty.BossRush;
	}

	// Token: 0x060017BF RID: 6079 RVA: 0x00036878 File Offset: 0x00034A78
	[Token(Token = "0x60017BF")]
	[Address(RVA = "0x94D9C0", Offset = "0x94C9C0", VA = "0x18094D9C0")]
	public UIPauseMenu()
	{
	}

	// Token: 0x0400230B RID: 8971
	[Cpp2IlInjected.FieldOffset(Offset = "0x58")]
	[Token(Token = "0x400230B")]
	[SerializeField]
	private Text title;

	// Token: 0x0400230C RID: 8972
	[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
	[Token(Token = "0x400230C")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x0400230D RID: 8973
	[Cpp2IlInjected.FieldOffset(Offset = "0x68")]
	[Token(Token = "0x400230D")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x0400230E RID: 8974
	[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
	[Token(Token = "0x400230E")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x0400230F RID: 8975
	[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
	[Token(Token = "0x400230F")]
	[SerializeField]
	private Image[] hintEffects;

	// Token: 0x04002310 RID: 8976
	[Cpp2IlInjected.FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002310")]
	private int currentNavigatorIndex;

	// Token: 0x04002311 RID: 8977
	[Cpp2IlInjected.FieldOffset(Offset = "0x84")]
	[Token(Token = "0x4002311")]
	private bool showValuablesButton;

	// Token: 0x04002312 RID: 8978
	[Cpp2IlInjected.FieldOffset(Offset = "0x85")]
	[Token(Token = "0x4002312")]
	private bool showSavePointButton;

	// Token: 0x04002313 RID: 8979
	[Cpp2IlInjected.FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002313")]
	private float allHandlersHeight;
}
