using System;
using System.Xml;
using Cpp2IlInjected;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using MarsSDK;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000290 RID: 656
[Token(Token = "0x2000290")]
public class UIVideoHandler : UIHandlerBase
{
	// Token: 0x1700010D RID: 269
	// (get) Token: 0x0600193A RID: 6458 RVA: 0x0003D204 File Offset: 0x0003B404
	[Token(Token = "0x1700010D")]
	public bool IsUnlocked
	{
		[Token(Token = "0x600193A")]
		[Address(RVA = "0x5EA8A0", Offset = "0x5E96A0", VA = "0x1805EA8A0")]
		get
		{
			return this.isUnlocked;
		}
	}

	// Token: 0x0600193B RID: 6459 RVA: 0x0003D218 File Offset: 0x0003B418
	[Token(Token = "0x600193B")]
	[Address(RVA = "0x8B8670", Offset = "0x8B7470", VA = "0x1808B8670", Slot = "8")]
	public override void OnSelect()
	{
		Action<UIHandlerBase> onSelectedHandler = this.onSelectedHandler;
		if (onSelectedHandler != 0)
		{
			onSelectedHandler(this);
		}
		if (this.isUnlocked)
		{
			TweenerCore<Vector3, Vector3, VectorOptions> tweenerCore = ShortcutExtensions.DOScale(this.rectTransform, 1.1f, 0.13f).SetEase((Ease)((uint)3)).SetUpdate(true)
				.Play<TweenerCore<Vector3, Vector3, VectorOptions>>();
			return;
		}
	}

	// Token: 0x0600193C RID: 6460 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600193C")]
	[Address(RVA = "0x8B8550", Offset = "0x8B7350", VA = "0x1808B8550", Slot = "9")]
	public override void OnDeselect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600193D RID: 6461 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600193D")]
	[Address(RVA = "0x8B8740", Offset = "0x8B7540", VA = "0x1808B8740")]
	public void SetLockState(bool isLocked)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600193E RID: 6462 RVA: 0x0003D26C File Offset: 0x0003B46C
	[Token(Token = "0x600193E")]
	[Address(RVA = "0x8B8920", Offset = "0x8B7720", VA = "0x1808B8920")]
	public void SetVideoCover(string videoCoverName)
	{
		AssetVideoCoverRequest assetVideoCoverRequest = new AssetVideoCoverRequest(videoCoverName);
		AssetVideoCoverRequest req = assetVideoCoverRequest;
		AssetVideoCoverRequest req3 = req;
		Action action = delegate
		{
			int assetGroup = req.AssetGroup;
			AssetVideoCoverRequest req2 = req;
			string videoCoverName2 = videoCoverName;
			string <AssetName>k__BackingField = req2.<AssetName>k__BackingField;
			Sprite subAsset = Game.GetSubAsset<Sprite>(assetGroup, <AssetName>k__BackingField, videoCoverName2);
			this.videoCover.sprite = subAsset;
		};
		req3.<OnFinished>k__BackingField = action;
		Game.LoadAssetAsync(req);
	}

	// Token: 0x0600193F RID: 6463 RVA: 0x0003D2CC File Offset: 0x0003B4CC
	[Token(Token = "0x600193F")]
	[Address(RVA = "0x8B88F0", Offset = "0x8B76F0", VA = "0x1808B88F0")]
	public void SetTimeLabel(string time)
	{
		bool dtdValidation = ((IDtdParserAdapterWithValidation)this.videoTime).DtdValidation;
	}

	// Token: 0x06001940 RID: 6464 RVA: 0x0003D2EC File Offset: 0x0003B4EC
	[Token(Token = "0x6001940")]
	[Address(RVA = "0x8B84A0", Offset = "0x8B72A0", VA = "0x1808B84A0")]
	public void Localize(string titleText, GameFontPack fontPack)
	{
		this.videoTitle.text = titleText;
		Text text = this.videoTitle;
		Font regular = fontPack.regular;
		text.font = regular;
		Text text2 = this.videoTime;
		Font light = fontPack.light;
		text2.font = light;
	}

	// Token: 0x06001941 RID: 6465 RVA: 0x0003D338 File Offset: 0x0003B538
	[Token(Token = "0x6001941")]
	[Address(RVA = "0x8B8A90", Offset = "0x8B7890", VA = "0x1808B8A90")]
	public UIVideoHandler()
	{
	}

	// Token: 0x04002300 RID: 8960
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002300")]
	[SerializeField]
	private Image frameBackground;

	// Token: 0x04002301 RID: 8961
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002301")]
	[SerializeField]
	private Image videoCover;

	// Token: 0x04002302 RID: 8962
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002302")]
	[SerializeField]
	private Image lockIcon;

	// Token: 0x04002303 RID: 8963
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002303")]
	[SerializeField]
	private Text videoTitle;

	// Token: 0x04002304 RID: 8964
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002304")]
	[SerializeField]
	private Text videoTime;

	// Token: 0x04002305 RID: 8965
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002305")]
	private bool isUnlocked = true;
}
