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

// Token: 0x020002DB RID: 731
[Token(Token = "0x20002DB")]
public class UIVideoHandler : UIHandlerBase
{
	// Token: 0x1700011D RID: 285
	// (get) Token: 0x06001B67 RID: 7015 RVA: 0x00042C10 File Offset: 0x00040E10
	[Token(Token = "0x1700011D")]
	public bool IsUnlocked
	{
		[Token(Token = "0x6001B67")]
		[Address(RVA = "0x5E87D0", Offset = "0x5E77D0", VA = "0x1805E87D0")]
		get
		{
			return this.isUnlocked;
		}
	}

	// Token: 0x06001B68 RID: 7016 RVA: 0x00042C24 File Offset: 0x00040E24
	[Token(Token = "0x6001B68")]
	[Address(RVA = "0xCC2FC0", Offset = "0xCC1FC0", VA = "0x180CC2FC0", 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: 0x06001B69 RID: 7017 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B69")]
	[Address(RVA = "0xCC2EA0", Offset = "0xCC1EA0", VA = "0x180CC2EA0", Slot = "9")]
	public override void OnDeselect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B6A RID: 7018 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B6A")]
	[Address(RVA = "0xCC3090", Offset = "0xCC2090", VA = "0x180CC3090")]
	public void SetLockState(bool isLocked)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B6B RID: 7019 RVA: 0x00042C78 File Offset: 0x00040E78
	[Token(Token = "0x6001B6B")]
	[Address(RVA = "0xCC3270", Offset = "0xCC2270", VA = "0x180CC3270")]
	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: 0x06001B6C RID: 7020 RVA: 0x00042CD8 File Offset: 0x00040ED8
	[Token(Token = "0x6001B6C")]
	[Address(RVA = "0xCC3240", Offset = "0xCC2240", VA = "0x180CC3240")]
	public void SetTimeLabel(string time)
	{
		((ICanvasElement)this.videoTime).GraphicUpdateComplete();
	}

	// Token: 0x06001B6D RID: 7021 RVA: 0x00042CF8 File Offset: 0x00040EF8
	[Token(Token = "0x6001B6D")]
	[Address(RVA = "0xCC2DF0", Offset = "0xCC1DF0", VA = "0x180CC2DF0")]
	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: 0x06001B6E RID: 7022 RVA: 0x00042D44 File Offset: 0x00040F44
	[Token(Token = "0x6001B6E")]
	[Address(RVA = "0xCC33E0", Offset = "0xCC23E0", VA = "0x180CC33E0")]
	public UIVideoHandler()
	{
	}

	// Token: 0x04002553 RID: 9555
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002553")]
	[SerializeField]
	private Image frameBackground;

	// Token: 0x04002554 RID: 9556
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002554")]
	[SerializeField]
	private Image videoCover;

	// Token: 0x04002555 RID: 9557
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002555")]
	[SerializeField]
	private Image lockIcon;

	// Token: 0x04002556 RID: 9558
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002556")]
	[SerializeField]
	private Text videoTitle;

	// Token: 0x04002557 RID: 9559
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002557")]
	[SerializeField]
	private Text videoTime;

	// Token: 0x04002558 RID: 9560
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002558")]
	private bool isUnlocked = true;
}
