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

// Token: 0x0200026B RID: 619
[Token(Token = "0x200026B")]
public class UIValuablesGuide : GameCanvasBase
{
	// Token: 0x170000F2 RID: 242
	// (get) Token: 0x060017D0 RID: 6096 RVA: 0x0003A6C0 File Offset: 0x000388C0
	[Token(Token = "0x170000F2")]
	private int currentTotalPages
	{
		[Token(Token = "0x60017D0")]
		[Address(RVA = "0x8B5120", Offset = "0x8B3F20", VA = "0x1808B5120")]
		get
		{
			return this.valuablesHandlersList._size;
		}
	}

	// Token: 0x060017D1 RID: 6097 RVA: 0x0003A6E0 File Offset: 0x000388E0
	[Token(Token = "0x60017D1")]
	[Address(RVA = "0x8B3790", Offset = "0x8B2590", VA = "0x1808B3790", Slot = "11")]
	public override void Init()
	{
		this.InitValuablesHandlers();
		this.InitPageDots();
		this.switchPageTip.Init();
	}

	// Token: 0x060017D2 RID: 6098 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017D2")]
	[Address(RVA = "0x8B23C0", Offset = "0x8B11C0", VA = "0x1808B23C0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017D3 RID: 6099 RVA: 0x0003A70C File Offset: 0x0003890C
	[Token(Token = "0x60017D3")]
	[Address(RVA = "0x8B27E0", Offset = "0x8B15E0", VA = "0x1808B27E0", Slot = "13")]
	protected override void Hide(Action completeHandler)
	{
		GamePropertyData props = Game.GameSave.props;
		bool flag = props.TryResetAllNewPropStates();
		bool flag2 = props != 0;
		this.isDirty = flag2;
		base.Hide(completeHandler);
	}

	// Token: 0x060017D4 RID: 6100 RVA: 0x0003A74C File Offset: 0x0003894C
	[Token(Token = "0x60017D4")]
	[Address(RVA = "0x764EC0", Offset = "0x763CC0", VA = "0x180764EC0", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x060017D5 RID: 6101 RVA: 0x0003A76C File Offset: 0x0003896C
	[Token(Token = "0x60017D5")]
	[Address(RVA = "0x8B4730", Offset = "0x8B3530", VA = "0x1808B4730", Slot = "19")]
	public override void SwitchLeftward()
	{
		this.arrowController.SwitchPageLeftward();
	}

	// Token: 0x060017D6 RID: 6102 RVA: 0x0003A78C File Offset: 0x0003898C
	[Token(Token = "0x60017D6")]
	[Address(RVA = "0x8B4770", Offset = "0x8B3570", VA = "0x1808B4770")]
	private int TrySwitchLeftward()
	{
		if (!this.isMoveTweening)
		{
			int num = this.currentPageIndex;
			if (num != 0)
			{
				this.previousPageIndex = num;
				this.currentPageIndex = num;
				this.DoMoveTween(225f);
				return this.currentPageIndex;
			}
		}
		return -1;
	}

	// Token: 0x060017D7 RID: 6103 RVA: 0x0003A7D0 File Offset: 0x000389D0
	[Token(Token = "0x60017D7")]
	[Address(RVA = "0x8B4750", Offset = "0x8B3550", VA = "0x1808B4750", Slot = "20")]
	public override void SwitchRightward()
	{
		this.arrowController.SwitchPageRightward();
	}

	// Token: 0x060017D8 RID: 6104 RVA: 0x0003A7F0 File Offset: 0x000389F0
	[Token(Token = "0x60017D8")]
	[Address(RVA = "0x8B47D0", Offset = "0x8B35D0", VA = "0x1808B47D0")]
	private int TrySwitchRightward()
	{
		if (!this.isMoveTweening)
		{
			int num = this.currentPageIndex;
			int size = this.valuablesHandlersList._size;
			if (num != size)
			{
				int num2 = this.currentPageIndex;
				this.previousPageIndex = num2;
				num2++;
				this.currentPageIndex = num2;
				this.DoMoveTween(-225f);
				return this.currentPageIndex;
			}
		}
		return -1;
	}

	// Token: 0x060017D9 RID: 6105 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017D9")]
	[Address(RVA = "0x8B4380", Offset = "0x8B3180", VA = "0x1808B4380", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DA RID: 6106 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DA")]
	[Address(RVA = "0x8B37D0", Offset = "0x8B25D0", VA = "0x1808B37D0", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DB RID: 6107 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DB")]
	[Address(RVA = "0x8B2AC0", Offset = "0x8B18C0", VA = "0x1808B2AC0")]
	private void InitValuablesHandlers()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DC RID: 6108 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DC")]
	[Address(RVA = "0x8B2890", Offset = "0x8B1690", VA = "0x1808B2890")]
	private void InitPageDots()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DD RID: 6109 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DD")]
	[Address(RVA = "0x8B3D20", Offset = "0x8B2B20", VA = "0x1808B3D20")]
	private void ResetUIStatus()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DE RID: 6110 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DE")]
	[Address(RVA = "0x8B41F0", Offset = "0x8B2FF0", VA = "0x1808B41F0")]
	private void SetupBackHandler(Direction2D direction2D, IEnumerable<UIHandlerBase> handlerBases)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017DF RID: 6111 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017DF")]
	[Address(RVA = "0x8B2490", Offset = "0x8B1290", VA = "0x1808B2490")]
	private void DoMoveTween(float offset)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017E0 RID: 6112 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017E0")]
	[Address(RVA = "0x8B3F60", Offset = "0x8B2D60", VA = "0x1808B3F60")]
	private void SetUIDirty()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017E1 RID: 6113 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017E1")]
	[Address(RVA = "0x8B4BD0", Offset = "0x8B39D0", VA = "0x1808B4BD0")]
	private void UpdateHandlersState()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017E2 RID: 6114 RVA: 0x0003A850 File Offset: 0x00038A50
	[Token(Token = "0x60017E2")]
	[Address(RVA = "0x8B4EB0", Offset = "0x8B3CB0", VA = "0x1808B4EB0")]
	private void UpdatePageIndex(int value)
	{
		int num = this.currentPageIndex;
		this.previousPageIndex = num;
		this.currentPageIndex = value;
	}

	// Token: 0x060017E3 RID: 6115 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017E3")]
	[Address(RVA = "0x8B4A80", Offset = "0x8B3880", VA = "0x1808B4A80")]
	private void UpdateDefaultHandler()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017E4 RID: 6116 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017E4")]
	[Address(RVA = "0x8B4950", Offset = "0x8B3750", VA = "0x1808B4950")]
	private void UpdateBackHandlerNavigation()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017E5 RID: 6117 RVA: 0x0003A874 File Offset: 0x00038A74
	[Token(Token = "0x60017E5")]
	[Address(RVA = "0x8B4ED0", Offset = "0x8B3CD0", VA = "0x1808B4ED0")]
	private void UpdatePageNumAndDots()
	{
		Image[] array = this.pageDots;
		int num = 0;
		if (num < array.Length)
		{
			Image image = array[num];
			Sprite[] array2 = this.pageDotSprites;
			if (num == this.currentPageIndex)
			{
			}
			Sprite sprite = array2[0];
			image.sprite = sprite;
			Image[] array3 = this.pageDots;
			num++;
		}
		int num2 = this.currentPageIndex;
		num2++;
		Text text = this.pageNumber;
		int size = this.valuablesHandlersList._size;
		string text2 = string.Format("{0} / {1}", num2, num2);
		text.text = text2;
	}

	// Token: 0x060017E6 RID: 6118 RVA: 0x0003A90C File Offset: 0x00038B0C
	[Token(Token = "0x60017E6")]
	[Address(RVA = "0x8B3BE0", Offset = "0x8B29E0", VA = "0x1808B3BE0")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.buttonNavigation;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.UpdatePos(anchoredPosition);
		this.buttonNavigation.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x060017E7 RID: 6119 RVA: 0x0003A94C File Offset: 0x00038B4C
	[Token(Token = "0x60017E7")]
	[Address(RVA = "0x764EE0", Offset = "0x763CE0", VA = "0x180764EE0")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.buttonNavigation.Hide();
	}

	// Token: 0x060017E8 RID: 6120 RVA: 0x0003A96C File Offset: 0x00038B6C
	[Token(Token = "0x60017E8")]
	[Address(RVA = "0x8B3B30", Offset = "0x8B2930", VA = "0x1808B3B30")]
	private void OnBackHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.backNavigation;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.UpdatePos(anchoredPosition);
		this.backNavigation.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x060017E9 RID: 6121 RVA: 0x0003A9AC File Offset: 0x00038BAC
	[Token(Token = "0x60017E9")]
	[Address(RVA = "0x8B3B00", Offset = "0x8B2900", VA = "0x1808B3B00")]
	private void OnBackHandlerDeselected(UIHandlerBase handler)
	{
		this.backNavigation.Hide();
	}

	// Token: 0x060017EA RID: 6122 RVA: 0x0003A9CC File Offset: 0x00038BCC
	[Token(Token = "0x60017EA")]
	[Address(RVA = "0x8B3C90", Offset = "0x8B2A90", VA = "0x1808B3C90")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.interactionIcon.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.interactionIcon.gameObject.SetActive(true);
	}

	// Token: 0x060017EB RID: 6123 RVA: 0x0003AA1C File Offset: 0x00038C1C
	[Token(Token = "0x60017EB")]
	[Address(RVA = "0x8B50A0", Offset = "0x8B3EA0", VA = "0x1808B50A0")]
	public UIValuablesGuide()
	{
		List<UIValuablesHandler[]> list = new List();
		this.valuablesHandlersList = list;
		base..ctor();
	}

	// Token: 0x04002212 RID: 8722
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4002212")]
	[SerializeField]
	private Text title;

	// Token: 0x04002213 RID: 8723
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4002213")]
	[SerializeField]
	private RectTransform valuablesHandlersRoot;

	// Token: 0x04002214 RID: 8724
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002214")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x04002215 RID: 8725
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002215")]
	[SerializeField]
	private UISwitchArrowController arrowController;

	// Token: 0x04002216 RID: 8726
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002216")]
	[SerializeField]
	private UIValuablesHandler valuablesHandlerTemplate;

	// Token: 0x04002217 RID: 8727
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002217")]
	[SerializeField]
	private CanvasGroup valuablesGroupTemplate;

	// Token: 0x04002218 RID: 8728
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002218")]
	[SerializeField]
	private Text pageNumber;

	// Token: 0x04002219 RID: 8729
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002219")]
	[SerializeField]
	private RectTransform pageDotsRoot;

	// Token: 0x0400221A RID: 8730
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x400221A")]
	[SerializeField]
	private Image pageDotTemplate;

	// Token: 0x0400221B RID: 8731
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x400221B")]
	[SerializeField]
	private Sprite[] pageDotSprites;

	// Token: 0x0400221C RID: 8732
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x400221C")]
	[SerializeField]
	private UINavigationEffect buttonNavigation;

	// Token: 0x0400221D RID: 8733
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x400221D")]
	[SerializeField]
	private UINavigationEffect backNavigation;

	// Token: 0x0400221E RID: 8734
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x400221E")]
	[SerializeField]
	private Image interactionIcon;

	// Token: 0x0400221F RID: 8735
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x400221F")]
	[SerializeField]
	private UISwitchPageTip switchPageTip;

	// Token: 0x04002220 RID: 8736
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x4002220")]
	private CanvasGroup[] valuablesGroups;

	// Token: 0x04002221 RID: 8737
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x4002221")]
	private List<UIValuablesHandler[]> valuablesHandlersList;

	// Token: 0x04002222 RID: 8738
	[FieldOffset(Offset = "0xD8")]
	[Token(Token = "0x4002222")]
	private Image[] pageDots;

	// Token: 0x04002223 RID: 8739
	[FieldOffset(Offset = "0xE0")]
	[Token(Token = "0x4002223")]
	private int currentUnlockedPropsCount;

	// Token: 0x04002224 RID: 8740
	[FieldOffset(Offset = "0xE4")]
	[Token(Token = "0x4002224")]
	private bool isDirty;

	// Token: 0x04002225 RID: 8741
	[FieldOffset(Offset = "0xE5")]
	[Token(Token = "0x4002225")]
	private bool isMoveTweening;

	// Token: 0x04002226 RID: 8742
	[FieldOffset(Offset = "0xE8")]
	[Token(Token = "0x4002226")]
	private int previousPageIndex;

	// Token: 0x04002227 RID: 8743
	[FieldOffset(Offset = "0xEC")]
	[Token(Token = "0x4002227")]
	private int currentPageIndex;

	// Token: 0x04002228 RID: 8744
	[Token(Token = "0x4002228")]
	private const int MAXIMUM_HANDLERS_LENGTH_PER_PAGE = 30;

	// Token: 0x04002229 RID: 8745
	[Token(Token = "0x4002229")]
	private const int MAXIMUM_ROW_LIMITATION = 10;

	// Token: 0x0400222A RID: 8746
	[Token(Token = "0x400222A")]
	private const float MOVE_DURATION = 0.6f;

	// Token: 0x0400222B RID: 8747
	[Token(Token = "0x400222B")]
	private const float FADE_IN_DURATION = 0.1f;

	// Token: 0x0400222C RID: 8748
	[Token(Token = "0x400222C")]
	private const float FADE_OUT_DURATION = 0.1f;
}
