using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000278 RID: 632
[Token(Token = "0x2000278")]
public class UISwitchArrowController : MonoBehaviour
{
	// Token: 0x0600187C RID: 6268 RVA: 0x0003BA18 File Offset: 0x00039C18
	[Token(Token = "0x600187C")]
	[Address(RVA = "0x18AE000", Offset = "0x18ACE00", VA = "0x1818AE000")]
	public void Init(Func<int> trySwitchLeftward, Func<int> trySwitchRightward)
	{
		this.trySwitchLeftward = trySwitchLeftward;
		this.trySwitchRightward = trySwitchRightward;
		UISwitchArrow uiswitchArrow = this.switchArrows[0];
		Action action = new Action(this.SwitchPageLeftward);
		uiswitchArrow.clickedHandler = action;
		UISwitchArrow uiswitchArrow2 = this.switchArrows[1];
		Action action2 = new Action(this.SwitchPageRightward);
		uiswitchArrow2.clickedHandler = action2;
		throw new NullReferenceException();
	}

	// Token: 0x0600187D RID: 6269 RVA: 0x0003BA7C File Offset: 0x00039C7C
	[Token(Token = "0x600187D")]
	[Address(RVA = "0x18AE140", Offset = "0x18ACF40", VA = "0x1818AE140")]
	public void SwitchPageLeftward()
	{
		Func<int> func = this.trySwitchLeftward;
		if (func != 0)
		{
			int num = func();
			if (num != -1)
			{
				this.switchArrows[0].PerformClickEffect();
				this.UpdateArrowState(num);
			}
		}
	}

	// Token: 0x0600187E RID: 6270 RVA: 0x0003BAC0 File Offset: 0x00039CC0
	[Token(Token = "0x600187E")]
	[Address(RVA = "0x18AE1E0", Offset = "0x18ACFE0", VA = "0x1818AE1E0")]
	public void SwitchPageRightward()
	{
		Func<int> func = this.trySwitchRightward;
		if (func != 0)
		{
			int num = func();
			if (num != -1)
			{
				this.switchArrows[1].PerformClickEffect();
				this.UpdateArrowState(num);
			}
		}
	}

	// Token: 0x0600187F RID: 6271 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600187F")]
	[Address(RVA = "0x18AE310", Offset = "0x18AD110", VA = "0x1818AE310")]
	public void UpdatePageAmount(int pageAmount, int currentPage = 0)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001880 RID: 6272 RVA: 0x0003BB04 File Offset: 0x00039D04
	[Token(Token = "0x6001880")]
	[Address(RVA = "0x18AE280", Offset = "0x18AD080", VA = "0x1818AE280")]
	private void UpdateArrowState(int currentPage)
	{
		UISwitchArrow uiswitchArrow = this.switchArrows[0];
		bool flag = currentPage > 0;
		uiswitchArrow.UpdateActivation(flag);
		UISwitchArrow uiswitchArrow2 = this.switchArrows[1];
		int num = this.pageAmount;
		bool flag2 = currentPage < num;
		uiswitchArrow2.UpdateActivation(flag2);
	}

	// Token: 0x06001881 RID: 6273 RVA: 0x0003BB54 File Offset: 0x00039D54
	[Token(Token = "0x6001881")]
	[Address(RVA = "0x18ADF00", Offset = "0x18ACD00", VA = "0x1818ADF00")]
	public void BindPointerEnterEvent(Action pointerEnterHandler)
	{
		this.switchArrows[0].pointerEnterHandler = pointerEnterHandler;
		this.switchArrows[1].pointerEnterHandler = pointerEnterHandler;
		throw new NullReferenceException();
	}

	// Token: 0x06001882 RID: 6274 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001882")]
	[Address(RVA = "0x18ADF90", Offset = "0x18ACD90", VA = "0x1818ADF90")]
	public bool HasPointerEntered()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001883 RID: 6275 RVA: 0x0003BB8C File Offset: 0x00039D8C
	[Token(Token = "0x6001883")]
	[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
	public UISwitchArrowController()
	{
	}

	// Token: 0x04002289 RID: 8841
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002289")]
	[SerializeField]
	private UISwitchArrow[] switchArrows;

	// Token: 0x0400228A RID: 8842
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x400228A")]
	private Func<int> trySwitchLeftward;

	// Token: 0x0400228B RID: 8843
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x400228B")]
	private Func<int> trySwitchRightward;

	// Token: 0x0400228C RID: 8844
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x400228C")]
	private int pageAmount;
}
