using System;
using Cpp2IlInjected;
using DG.Tweening;
using MarsSDK;
using MEC;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000254 RID: 596
[Token(Token = "0x2000254")]
public class UIGameSave : GameCanvasBase
{
	// Token: 0x06001704 RID: 5892 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001704")]
	[Address(RVA = "0x764480", Offset = "0x763280", VA = "0x180764480", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001705 RID: 5893 RVA: 0x00038208 File Offset: 0x00036408
	[Token(Token = "0x6001705")]
	[Address(RVA = "0x765550", Offset = "0x764350", VA = "0x180765550")]
	public void SetMode(GameSavePageMode mode)
	{
		this.pageMode = mode;
		LocalizationData localizationData = Game.GetLocalizationData();
		Text text = this.title;
		GameTextData systemText = localizationData.systemText;
		if (this.pageMode == GameSavePageMode.NewGame)
		{
		}
		string text2 = systemText.GetText(22);
		text.text = text2;
		GameFontPack fontPack = localizationData.fontPack;
		Text text3 = this.title;
		Font light = fontPack.light;
		text3.font = light;
	}

	// Token: 0x06001706 RID: 5894 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001706")]
	[Address(RVA = "0x763FC0", Offset = "0x762DC0", VA = "0x180763FC0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001707 RID: 5895 RVA: 0x0003827C File Offset: 0x0003647C
	[Token(Token = "0x6001707")]
	[Address(RVA = "0x765640", Offset = "0x764440", VA = "0x180765640")]
	private void SetPageActive()
	{
		UINavigationEffect uinavigationEffect = this.saveDataNavigation;
		UIGameSavePage[] array = this.pages;
		int num = this.pageIndex;
		Transform transform = array[num].transform;
		uinavigationEffect.UpdateParent(transform);
		if (!this.arrowController.HasPointerEntered())
		{
			UIGameSavePage[] array2 = this.pages;
			int num2 = this.pageIndex;
			UIGameSavePage uigameSavePage = array2[num2];
			int num3 = this.lastSelectedSaveNumber;
			UINavigator navigator = this.navigator;
			UILabelHandler uilabelHandler = this.backHandler;
			uigameSavePage.SetActive(navigator, uilabelHandler);
			UIGameSaveHandler uigameSaveHandler = uigameSavePage.saveDataHandlers[num3];
			navigator.SetDefaultHandler(uigameSaveHandler);
			UIGameSaveDeleteHandler uigameSaveDeleteHandler = uigameSavePage.deleteHandlers[num3];
			uigameSavePage.lastDeleteHandler = uigameSaveDeleteHandler;
			return;
		}
		UIGameSavePage[] array3 = this.pages;
		int num4 = this.pageIndex;
		UIGameSavePage uigameSavePage2 = array3[num4];
		UILabelHandler uilabelHandler2 = this.backHandler;
		UINavigator navigator2 = this.navigator;
		uigameSavePage2.SetActive(navigator2, uilabelHandler2);
		throw new NullReferenceException();
	}

	// Token: 0x06001708 RID: 5896 RVA: 0x0003836C File Offset: 0x0003656C
	[Token(Token = "0x6001708")]
	[Address(RVA = "0x766D90", Offset = "0x765B90", VA = "0x180766D90", Slot = "19")]
	public override void SwitchLeftward()
	{
		this.arrowController.SwitchPageLeftward();
	}

	// Token: 0x06001709 RID: 5897 RVA: 0x0003838C File Offset: 0x0003658C
	[Token(Token = "0x6001709")]
	[Address(RVA = "0x7670B0", Offset = "0x765EB0", VA = "0x1807670B0")]
	private int TrySwitchLeftward()
	{
		int num = this.pageIndex;
		if (num != 0)
		{
			int num2 = num - 1;
			this.pageIndex = num2;
			UIGameSavePage uigameSavePage = this.pages[num];
			this.SwitchPage(uigameSavePage);
			return this.pageIndex;
		}
		return -1;
	}

	// Token: 0x0600170A RID: 5898 RVA: 0x000383D4 File Offset: 0x000365D4
	[Token(Token = "0x600170A")]
	[Address(RVA = "0x767080", Offset = "0x765E80", VA = "0x180767080", Slot = "20")]
	public override void SwitchRightward()
	{
		this.arrowController.SwitchPageRightward();
	}

	// Token: 0x0600170B RID: 5899 RVA: 0x000383F4 File Offset: 0x000365F4
	[Token(Token = "0x600170B")]
	[Address(RVA = "0x767110", Offset = "0x765F10", VA = "0x180767110")]
	private int TrySwitchRightward()
	{
		int num = this.pageIndex;
		if (num != 2)
		{
			int num2 = num + 1;
			this.pageIndex = num2;
			UIGameSavePage uigameSavePage = this.pages[num];
			this.SwitchPage(uigameSavePage);
			return this.pageIndex;
		}
		return -1;
	}

	// Token: 0x0600170C RID: 5900 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600170C")]
	[Address(RVA = "0x766DC0", Offset = "0x765BC0", VA = "0x180766DC0")]
	private void SwitchPage(UIGameSavePage fadeOutPage)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600170D RID: 5901 RVA: 0x0003843C File Offset: 0x0003663C
	[Token(Token = "0x600170D")]
	[Address(RVA = "0x7652D0", Offset = "0x7640D0", VA = "0x1807652D0")]
	private void OnSwitchPageCompleted()
	{
		UIGameSavePage[] array = this.pages;
		this.canDisplayDeleteHandler = true;
		int num = this.pageIndex;
		ulong num2;
		array[num].canvasGroup.blocksRaycasts = num2 != 0UL;
		if (!this.arrowController.HasPointerEntered())
		{
			UIGameSavePage[] array2 = this.pages;
			int num3 = this.pageIndex;
			UIGameSavePage uigameSavePage = array2[num3];
			int num4 = this.lastSelectedSaveNumber;
			uigameSavePage.AppearDeleteHandler(num4);
			return;
		}
	}

	// Token: 0x0600170E RID: 5902 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600170E")]
	[Address(RVA = "0x764400", Offset = "0x763200", VA = "0x180764400")]
	private Tween GetPageSlideTween(float duration)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600170F RID: 5903 RVA: 0x000384B0 File Offset: 0x000366B0
	[Token(Token = "0x600170F")]
	[Address(RVA = "0x764EC0", Offset = "0x763CC0", VA = "0x180764EC0", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x06001710 RID: 5904 RVA: 0x000384D0 File Offset: 0x000366D0
	[Token(Token = "0x6001710")]
	[Address(RVA = "0x765150", Offset = "0x763F50", VA = "0x180765150")]
	private void OnSaveHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.saveDataNavigation;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		int num = 0;
		uinavigationEffect.UpdatePos(num);
		this.saveDataNavigation.Appear();
		int index = handler.index;
		this.lastSelectedSaveNumber = index;
		if (this.canDisplayDeleteHandler)
		{
			UIGameSavePage[] array = this.pages;
			int num2 = this.pageIndex;
			array[num2].AppearDeleteHandler(index);
		}
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001711 RID: 5905 RVA: 0x00038548 File Offset: 0x00036748
	[Token(Token = "0x6001711")]
	[Address(RVA = "0x765120", Offset = "0x763F20", VA = "0x180765120")]
	private void OnSaveHandlerDeselected(UIHandlerBase handler)
	{
		this.saveDataNavigation.Hide();
	}

	// Token: 0x06001712 RID: 5906 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001712")]
	[Address(RVA = "0x764FF0", Offset = "0x763DF0", VA = "0x180764FF0")]
	private void OnDeleteHandlerSelected(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001713 RID: 5907 RVA: 0x00038568 File Offset: 0x00036768
	[Token(Token = "0x6001713")]
	[Address(RVA = "0x764FC0", Offset = "0x763DC0", VA = "0x180764FC0")]
	private void OnDeleteHandlerDeselected(UIHandlerBase handler)
	{
		this.deleteNavigation.Hide();
	}

	// Token: 0x06001714 RID: 5908 RVA: 0x00038588 File Offset: 0x00036788
	[Token(Token = "0x6001714")]
	[Address(RVA = "0x764F10", Offset = "0x763D10", VA = "0x180764F10")]
	private void OnBackHandlerSelected(UIHandlerBase handler)
	{
		this.bottomNavigationEffect.Appear();
		UIGameSavePage[] array = this.pages;
		this.lastSelectedSaveNumber = (int)((ulong)4294967295L);
		int num = this.pageIndex;
		array[num].HideDeleteHandler();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001715 RID: 5909 RVA: 0x000385D8 File Offset: 0x000367D8
	[Token(Token = "0x6001715")]
	[Address(RVA = "0x764EE0", Offset = "0x763CE0", VA = "0x180764EE0")]
	private void OnBackHandlerDeselected(UIHandlerBase handler)
	{
		this.bottomNavigationEffect.Hide();
	}

	// Token: 0x06001716 RID: 5910 RVA: 0x000385F8 File Offset: 0x000367F8
	[Token(Token = "0x6001716")]
	[Address(RVA = "0x765270", Offset = "0x764070", VA = "0x180765270")]
	private void OnSwitchArrowPointerEntered()
	{
		UIGameSavePage[] array = this.pages;
		int num = this.pageIndex;
		array[num].HideDeleteHandler();
		this.navigator.Clear();
	}

	// Token: 0x06001717 RID: 5911 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001717")]
	[Address(RVA = "0x766C30", Offset = "0x765A30", VA = "0x180766C30", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001718 RID: 5912 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001718")]
	[Address(RVA = "0x765810", Offset = "0x764610", VA = "0x180765810")]
	private void ShowCreatingGameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001719 RID: 5913 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001719")]
	[Address(RVA = "0x7662C0", Offset = "0x7650C0", VA = "0x1807662C0")]
	private void ShowLoadingSameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600171A RID: 5914 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600171A")]
	[Address(RVA = "0x765D00", Offset = "0x764B00", VA = "0x180765D00")]
	private void ShowDeletingGameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600171B RID: 5915 RVA: 0x00038630 File Offset: 0x00036830
	[Token(Token = "0x600171B")]
	[Address(RVA = "0x7653A0", Offset = "0x7641A0", VA = "0x1807653A0")]
	private void OpenMessageBox(UIMessageBox messageBox, MessageBoxConfig config)
	{
		int num = 0;
		this.Hide(num);
		this.Lock();
		Action action = delegate
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		};
		MessageBoxConfig messageBoxConfig = config.BindCloseEvent(action);
		messageBox.OpenMsgBox(config);
	}

	// Token: 0x0600171C RID: 5916 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600171C")]
	[Address(RVA = "0x765480", Offset = "0x764280", VA = "0x180765480")]
	private void PerformSubmitEffect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600171D RID: 5917 RVA: 0x00038670 File Offset: 0x00036870
	[Token(Token = "0x600171D")]
	[Address(RVA = "0x764370", Offset = "0x763170", VA = "0x180764370")]
	private void CreateNewGameSave(GameDifficulty difficulty)
	{
		UIGameSave.<>c__DisplayClass42_0 CS$<>8__locals1 = new UIGameSave.<>c__DisplayClass42_0();
		CS$<>8__locals1.<>4__this = this;
		CS$<>8__locals1.difficulty = difficulty;
		CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(CS$<>8__locals1.<CreateNewGameSave>g__WaitNextAction|0());
	}

	// Token: 0x0600171E RID: 5918 RVA: 0x000386A8 File Offset: 0x000368A8
	[Token(Token = "0x600171E")]
	[Address(RVA = "0x764BA0", Offset = "0x7639A0", VA = "0x180764BA0")]
	private void LoadGameSave(int previewDataIndex)
	{
		UIGameSave.<>c__DisplayClass43_0 CS$<>8__locals1 = new UIGameSave.<>c__DisplayClass43_0();
		CS$<>8__locals1.<>4__this = this;
		CS$<>8__locals1.previewDataIndex = previewDataIndex;
		CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(CS$<>8__locals1.<LoadGameSave>g__WaitNextAction|0());
	}

	// Token: 0x0600171F RID: 5919 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600171F")]
	[Address(RVA = "0x766B50", Offset = "0x765950", VA = "0x180766B50")]
	private void StartGamePlay(GameSave gameSave)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001720 RID: 5920 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001720")]
	[Address(RVA = "0x764C30", Offset = "0x763A30", VA = "0x180764C30", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001721 RID: 5921 RVA: 0x000386DC File Offset: 0x000368DC
	[Token(Token = "0x6001721")]
	[Address(RVA = "0x767330", Offset = "0x766130", VA = "0x180767330")]
	private void UpdateTitle(LocalizationData data)
	{
		Text text = this.title;
		GameTextData systemText = data.systemText;
		if (this.pageMode == GameSavePageMode.NewGame)
		{
		}
		string text2 = systemText.GetText(22);
		text.text = text2;
		GameFontPack fontPack = data.fontPack;
		Text text3 = this.title;
		Font light = fontPack.light;
		text3.font = light;
	}

	// Token: 0x06001722 RID: 5922 RVA: 0x00038738 File Offset: 0x00036938
	[Token(Token = "0x6001722")]
	[Address(RVA = "0x767270", Offset = "0x766070", VA = "0x180767270")]
	private void UpdateSaveDataContents()
	{
		UIGameSavePage[] array = this.pages;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UIGameSavePage uigameSavePage = array[num];
			LocalizationData localizationData = Game.GetLocalizationData();
			uigameSavePage.UpdateContent(localizationData);
			num++;
		}
	}

	// Token: 0x06001723 RID: 5923 RVA: 0x00038780 File Offset: 0x00036980
	[Token(Token = "0x6001723")]
	[Address(RVA = "0x7673D0", Offset = "0x7661D0", VA = "0x1807673D0")]
	public UIGameSave()
	{
	}

	// Token: 0x04002170 RID: 8560
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4002170")]
	[SerializeField]
	private Text title;

	// Token: 0x04002171 RID: 8561
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4002171")]
	[SerializeField]
	private int pageIndex;

	// Token: 0x04002172 RID: 8562
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002172")]
	[SerializeField]
	private RectTransform pageRoot;

	// Token: 0x04002173 RID: 8563
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002173")]
	[SerializeField]
	private UIGameSavePage[] pages;

	// Token: 0x04002174 RID: 8564
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002174")]
	[SerializeField]
	private UISwitchPageTip switchPageTip;

	// Token: 0x04002175 RID: 8565
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002175")]
	[SerializeField]
	private UIPageNumber pageNumber;

	// Token: 0x04002176 RID: 8566
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002176")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x04002177 RID: 8567
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002177")]
	[SerializeField]
	private UISwitchArrowController arrowController;

	// Token: 0x04002178 RID: 8568
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4002178")]
	[SerializeField]
	private UINavigationEffect saveDataNavigation;

	// Token: 0x04002179 RID: 8569
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4002179")]
	[SerializeField]
	private UINavigationEffect deleteNavigation;

	// Token: 0x0400217A RID: 8570
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x400217A")]
	[SerializeField]
	private UINavigationEffect bottomNavigationEffect;

	// Token: 0x0400217B RID: 8571
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x400217B")]
	[SerializeField]
	private RectTransform bottomSubmissionEffect;

	// Token: 0x0400217C RID: 8572
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x400217C")]
	private GameSavePageMode pageMode = (GameSavePageMode)((ulong)1L);

	// Token: 0x0400217D RID: 8573
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x400217D")]
	private Sequence slideProcessor;

	// Token: 0x0400217E RID: 8574
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x400217E")]
	private int newGameIndex;

	// Token: 0x0400217F RID: 8575
	[FieldOffset(Offset = "0xCC")]
	[Token(Token = "0x400217F")]
	private bool canDisplayDeleteHandler;

	// Token: 0x04002180 RID: 8576
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x4002180")]
	private int lastSelectedSaveNumber;
}
