using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using MarsSDK;
using MEC;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x0200028C RID: 652
[Token(Token = "0x200028C")]
public class UIValueBindingHandler : UIHandlerBase
{
	// Token: 0x170000EF RID: 239
	// (get) Token: 0x06001862 RID: 6242 RVA: 0x0003886C File Offset: 0x00036A6C
	[Token(Token = "0x170000EF")]
	public RectTransform Root
	{
		[Token(Token = "0x6001862")]
		[Address(RVA = "0x33F340", Offset = "0x33E340", VA = "0x18033F340")]
		get
		{
			return this.root;
		}
	}

	// Token: 0x170000F0 RID: 240
	// (get) Token: 0x06001863 RID: 6243 RVA: 0x00038880 File Offset: 0x00036A80
	[Token(Token = "0x170000F0")]
	public bool Locked
	{
		[Token(Token = "0x6001863")]
		[Address(RVA = "0x4BEA50", Offset = "0x4BDA50", VA = "0x1804BEA50")]
		get
		{
			return this.isLocked;
		}
	}

	// Token: 0x06001864 RID: 6244 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001864")]
	[Address(RVA = "0xCC2070", Offset = "0xCC1070", VA = "0x180CC2070")]
	public void Init(Action<int> valueChangedHandler, string[] contents)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001865 RID: 6245 RVA: 0x00038894 File Offset: 0x00036A94
	[Token(Token = "0x6001865")]
	[Address(RVA = "0xCC2C80", Offset = "0xCC1C80", VA = "0x180CC2C80")]
	public void UpdatePointer(int pointer)
	{
		string[] array = this.contents;
		Text text = this.value;
		this.pointer = pointer;
		((ICanvasElement)text).GraphicUpdateComplete();
	}

	// Token: 0x06001866 RID: 6246 RVA: 0x000388C4 File Offset: 0x00036AC4
	[Token(Token = "0x6001866")]
	[Address(RVA = "0xCC25B0", Offset = "0xCC15B0", VA = "0x180CC25B0", Slot = "8")]
	public override void OnSelect()
	{
		TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore = ShortcutExtensions.DOScale(this.valueRoot, 1.3f, 0.2f).SetEase((Ease)((uint)15)).Play<TweenerCore<Vector3, Vector3, VectorOptions>>();
		this.AppearArrows();
		Action<UIHandlerBase> onSelectedHandler = this.onSelectedHandler;
		if (onSelectedHandler != 0)
		{
			onSelectedHandler(this);
			return;
		}
	}

	// Token: 0x06001867 RID: 6247 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001867")]
	[Address(RVA = "0xCC2460", Offset = "0xCC1460", VA = "0x180CC2460", Slot = "9")]
	public override void OnDeselect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001868 RID: 6248 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001868")]
	[Address(RVA = "0xCC1ED0", Offset = "0xCC0ED0", VA = "0x180CC1ED0")]
	private void AppearArrows()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001869 RID: 6249 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001869")]
	[Address(RVA = "0xCC1FA0", Offset = "0xCC0FA0", VA = "0x180CC1FA0")]
	private void HideArrows()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600186A RID: 6250 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600186A")]
	[Address(RVA = "0xCC2660", Offset = "0xCC1660", VA = "0x180CC2660")]
	private IEnumerator<float> PerformArrowFading(float alpha)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600186B RID: 6251 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600186B")]
	[Address(RVA = "0xCC2A90", Offset = "0xCC1A90", VA = "0x180CC2A90")]
	private void UpdateArrowAlpha(float alpha)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600186C RID: 6252 RVA: 0x00038910 File Offset: 0x00036B10
	[Token(Token = "0x600186C")]
	[Address(RVA = "0xCC27E0", Offset = "0xCC17E0", VA = "0x180CC27E0")]
	public void TryMove(Direction2D direction)
	{
		if (!this.isLocked)
		{
			int num = this.pointer;
			if (direction != Direction2D.Left && direction == Direction2D.Right)
			{
				num++;
			}
			int length = this.contents.Length;
			string[] array = this.contents;
			if (length != num)
			{
				Text text = this.value;
				this.pointer = length;
				string text2 = array[length];
				text.text = text2;
				Action<int> action = this.valueChangedHandler;
				if (action != 0)
				{
					int num2 = this.pointer;
					action(num2);
				}
			}
		}
	}

	// Token: 0x0600186D RID: 6253 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600186D")]
	[Address(RVA = "0xCC23E0", Offset = "0xCC13E0", VA = "0x180CC23E0")]
	public void Lock(string lockedContent)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600186E RID: 6254 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600186E")]
	[Address(RVA = "0xCC2380", Offset = "0xCC1380", VA = "0x180CC2380")]
	public void Lock()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600186F RID: 6255 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600186F")]
	[Address(RVA = "0xCC29D0", Offset = "0xCC19D0", VA = "0x180CC29D0")]
	public void UnLock()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001870 RID: 6256 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001870")]
	[Address(RVA = "0xCC2CE0", Offset = "0xCC1CE0", VA = "0x180CC2CE0")]
	private void UpdateValueColor()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001871 RID: 6257 RVA: 0x00038998 File Offset: 0x00036B98
	[Token(Token = "0x6001871")]
	[Address(RVA = "0xCC2C10", Offset = "0xCC1C10", VA = "0x180CC2C10")]
	public void UpdateLabelText(string value)
	{
		((ICanvasElement)this.label).GraphicUpdateComplete();
	}

	// Token: 0x06001872 RID: 6258 RVA: 0x000389B8 File Offset: 0x00036BB8
	[Token(Token = "0x6001872")]
	[Address(RVA = "0xCC2D40", Offset = "0xCC1D40", VA = "0x180CC2D40")]
	public void UpdateValueText(string[] contents)
	{
		string[] array = Enumerable.ToArray<string>(contents);
		this.contents = array;
		if (!this.isLocked)
		{
			Text text = this.value;
			int num = this.pointer;
			string text2 = contents[num];
			text.text = text2;
		}
	}

	// Token: 0x06001873 RID: 6259 RVA: 0x00038A00 File Offset: 0x00036C00
	[Token(Token = "0x6001873")]
	[Address(RVA = "0xCC2C80", Offset = "0xCC1C80", VA = "0x180CC2C80")]
	public void UpdateValueText(int index)
	{
		string[] array = this.contents;
		Text text = this.value;
		this.pointer = index;
		((ICanvasElement)text).GraphicUpdateComplete();
	}

	// Token: 0x06001874 RID: 6260 RVA: 0x00038A30 File Offset: 0x00036C30
	[Token(Token = "0x6001874")]
	[Address(RVA = "0xCC2C40", Offset = "0xCC1C40", VA = "0x180CC2C40")]
	public void UpdateLockText(string content)
	{
		if (this.isLocked)
		{
			((ICanvasElement)this.value).GraphicUpdateComplete();
			return;
		}
	}

	// Token: 0x06001875 RID: 6261 RVA: 0x00038A58 File Offset: 0x00036C58
	[Token(Token = "0x6001875")]
	[Address(RVA = "0xCC2BB0", Offset = "0xCC1BB0", VA = "0x180CC2BB0")]
	public void UpdateFont(GameFontPack fontPack)
	{
		Text text = this.label;
		Font regular = fontPack.regular;
		text.font = regular;
		Text text2 = this.value;
		Font light = fontPack.light;
		text2.font = light;
	}

	// Token: 0x06001876 RID: 6262 RVA: 0x00038A98 File Offset: 0x00036C98
	[Token(Token = "0x6001876")]
	[Address(RVA = "0xCC26E0", Offset = "0xCC16E0", VA = "0x180CC26E0")]
	public void PlayScaleEffect()
	{
		RectTransform rectTransform = this.value.rectTransform;
		int num = 0;
		int num2 = rectTransform.DOKill(num != 0);
		TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore = ShortcutExtensions.DOScale(this.value.rectTransform, 0.7f, 0.075f);
		int num3 = 0;
		TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore2 = TweenSettingsExtensions.From(tweenerCore, 1f, true, num3 != 0).SetLoops(2, LoopType.Yoyo).SetEase((Ease)((uint)3))
			.Play<TweenerCore<Vector3, Vector3, VectorOptions>>();
	}

	// Token: 0x06001877 RID: 6263 RVA: 0x00038B04 File Offset: 0x00036D04
	[Token(Token = "0x6001877")]
	[Address(RVA = "0x41ED30", Offset = "0x41DD30", VA = "0x18041ED30")]
	public UIValueBindingHandler()
	{
	}

	// Token: 0x0400235F RID: 9055
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x400235F")]
	[SerializeField]
	private RectTransform root;

	// Token: 0x04002360 RID: 9056
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002360")]
	[SerializeField]
	private RectTransform valueRoot;

	// Token: 0x04002361 RID: 9057
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002361")]
	[SerializeField]
	private Text label;

	// Token: 0x04002362 RID: 9058
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002362")]
	[SerializeField]
	private Text value;

	// Token: 0x04002363 RID: 9059
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002363")]
	[SerializeField]
	private int pointer;

	// Token: 0x04002364 RID: 9060
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002364")]
	[SerializeField]
	private string[] contents;

	// Token: 0x04002365 RID: 9061
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4002365")]
	[SerializeField]
	private bool isLocked;

	// Token: 0x04002366 RID: 9062
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4002366")]
	[SerializeField]
	private UIValueBindingArrow leftArrow;

	// Token: 0x04002367 RID: 9063
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4002367")]
	[SerializeField]
	private UIValueBindingArrow rightArrow;

	// Token: 0x04002368 RID: 9064
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4002368")]
	private Action<int> valueChangedHandler;

	// Token: 0x04002369 RID: 9065
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4002369")]
	private CoroutineHandle arrowProcessor;

	// Token: 0x0400236A RID: 9066
	[FieldOffset(Offset = "0xBC")]
	[Token(Token = "0x400236A")]
	private float arrowAlpha;
}
