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

// Token: 0x0200022A RID: 554
[Token(Token = "0x200022A")]
[RequireComponent(typeof(Canvas), typeof(CanvasGroup), typeof(GraphicRaycaster))]
public abstract class GameCanvasBase : MonoBehaviour, IUIController
{
	// Token: 0x170000D7 RID: 215
	// (get) Token: 0x06001545 RID: 5445 RVA: 0x00030208 File Offset: 0x0002E408
	[Token(Token = "0x170000D7")]
	public bool Enabled
	{
		[Token(Token = "0x6001545")]
		[Address(RVA = "0x53A970", Offset = "0x539770", VA = "0x18053A970")]
		get
		{
			return this.canvas.enabled;
		}
	}

	// Token: 0x06001546 RID: 5446
	[Token(Token = "0x6001546")]
	[Address(Slot = "11")]
	public abstract void Init();

	// Token: 0x06001547 RID: 5447 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001547")]
	[Address(RVA = "0x539F90", Offset = "0x538D90", VA = "0x180539F90", Slot = "12")]
	protected virtual void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001548 RID: 5448 RVA: 0x00030228 File Offset: 0x0002E428
	[Token(Token = "0x6001548")]
	[Address(RVA = "0x53A390", Offset = "0x539190", VA = "0x18053A390", Slot = "13")]
	protected virtual void Hide(Action completeHandler)
	{
		this.navigator.UnbindHandlerMovedEvent();
		Game.UnbindUIController();
		Game.DisablePauseMenuAction();
		Sequence sequence = this.seq;
		if (sequence != 0)
		{
			int num = 0;
			sequence.Kill(num != 0);
		}
		float num2 = this.fadeOutDuration;
		CanvasGroup canvasGroup = this.canvasGroup;
		int num3 = 0;
		TweenerCore<float, float, FloatOptions> tweenerCore = DOTweenModuleUI.DOFade(canvasGroup, (float)num3, num2).SetUpdate(true);
		TweenCallback tweenCallback = delegate
		{
			CanvasGroup canvasGroup2 = this.canvasGroup;
			int num4 = 0;
			canvasGroup2.blocksRaycasts = num4 != 0;
			Action completeHandler2 = completeHandler;
			if (completeHandler2 != 0)
			{
				completeHandler2();
			}
			UIStackingManager uistackingManager = Game.GetUIStackingManager();
			GameCanvasBase <>4__this = this;
			uistackingManager.RemoveCanvas(<>4__this);
		};
		TweenerCore<float, float, FloatOptions> tweenerCore2 = tweenerCore.OnComplete(tweenCallback).Play<TweenerCore<float, float, FloatOptions>>();
	}

	// Token: 0x06001549 RID: 5449 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001549")]
	[Address(RVA = "0x53A550", Offset = "0x539350", VA = "0x18053A550")]
	public void Open(Action closedHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600154A RID: 5450 RVA: 0x000302C4 File Offset: 0x0002E4C4
	[Token(Token = "0x600154A")]
	[Address(RVA = "0x53A2D0", Offset = "0x5390D0", VA = "0x18053A2D0")]
	public void Close()
	{
		this.Lock();
		Action action = new Action(this.<Close>g__CompleteProcess|17_0);
		this.Init();
	}

	// Token: 0x0600154B RID: 5451 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600154B")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "14")]
	protected virtual void OnCloseCompleted()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600154C RID: 5452 RVA: 0x000302EC File Offset: 0x0002E4EC
	[Token(Token = "0x600154C")]
	[Address(RVA = "0x53A360", Offset = "0x539160", VA = "0x18053A360", Slot = "15")]
	public virtual void ForceClose([Optional] Action closedHandler)
	{
		this.closedHandler = closedHandler;
		this.Close();
	}

	// Token: 0x0600154D RID: 5453 RVA: 0x00030308 File Offset: 0x0002E508
	[Token(Token = "0x600154D")]
	[Address(RVA = "0x53A520", Offset = "0x539320", VA = "0x18053A520", Slot = "16")]
	protected virtual void Lock()
	{
		CanvasGroup canvasGroup = this.canvasGroup;
		int num = 0;
		canvasGroup.blocksRaycasts = num != 0;
	}

	// Token: 0x0600154E RID: 5454 RVA: 0x0003032C File Offset: 0x0002E52C
	[Token(Token = "0x600154E")]
	[Address(RVA = "0x53A890", Offset = "0x539690", VA = "0x18053A890", Slot = "17")]
	protected virtual void Unlock()
	{
		this.canvasGroup.blocksRaycasts = true;
	}

	// Token: 0x0600154F RID: 5455 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600154F")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "18")]
	public virtual void Move(Direction2D direction)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001550 RID: 5456 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001550")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "19")]
	public virtual void SwitchLeftward()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001551 RID: 5457 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001551")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "20")]
	public virtual void SwitchRightward()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001552 RID: 5458 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001552")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "21")]
	public virtual void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001553 RID: 5459 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001553")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "22")]
	public virtual void Hold(bool onHolding)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001554 RID: 5460 RVA: 0x0003034C File Offset: 0x0002E54C
	[Token(Token = "0x6001554")]
	[Address(RVA = "0x53A260", Offset = "0x539060", VA = "0x18053A260", Slot = "23")]
	public virtual void Cancel()
	{
		if (!this.ignoreCancelInput)
		{
			this.Close();
			Game.PlayCanvasSE(UICanvasSFX.Close);
			return;
		}
	}

	// Token: 0x06001555 RID: 5461 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001555")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "24")]
	public virtual void SpecialAction()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001556 RID: 5462 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001556")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "25")]
	public virtual void Localize(LocalizationData data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001557 RID: 5463 RVA: 0x00030370 File Offset: 0x0002E570
	[Token(Token = "0x6001557")]
	[Address(RVA = "0x502BB0", Offset = "0x5019B0", VA = "0x180502BB0")]
	public void SetScaleEffectDisplay(bool enabled)
	{
		this.enableScaleEffect = enabled;
	}

	// Token: 0x06001558 RID: 5464 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001558")]
	[Address(RVA = "0x53A8C0", Offset = "0x5396C0", VA = "0x18053A8C0")]
	private void UpdateCursorPosition(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001559 RID: 5465 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001559")]
	[Address(RVA = "0x53A600", Offset = "0x539400", VA = "0x18053A600")]
	protected void SimpleAppear()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600155A RID: 5466 RVA: 0x00030384 File Offset: 0x0002E584
	[Token(Token = "0x600155A")]
	[Address(RVA = "0x53A7A0", Offset = "0x5395A0", VA = "0x18053A7A0")]
	protected void SimpleHide()
	{
		CanvasGroup canvasGroup = this.canvasGroup;
		int num = 0;
		canvasGroup.blocksRaycasts = num != 0;
		Sequence sequence = this.seq;
		if (sequence != 0)
		{
			int num2 = 0;
			sequence.Kill(num2 != 0);
		}
		float num3 = this.fadeOutDuration;
		CanvasGroup canvasGroup2 = this.canvasGroup;
		int num4 = 0;
		TweenerCore<float, float, FloatOptions> tweenerCore = DOTweenModuleUI.DOFade(canvasGroup2, (float)num4, num3).SetUpdate(true).Play<TweenerCore<float, float, FloatOptions>>();
	}

	// Token: 0x0600155B RID: 5467 RVA: 0x000303E8 File Offset: 0x0002E5E8
	[Token(Token = "0x600155B")]
	[Address(RVA = "0x53A940", Offset = "0x539740", VA = "0x18053A940")]
	protected GameCanvasBase()
	{
	}

	// Token: 0x0600155C RID: 5468 RVA: 0x00030430 File Offset: 0x0002E630
	[Token(Token = "0x600155C")]
	[Address(RVA = "0x53A840", Offset = "0x539640", VA = "0x18053A840")]
	[CompilerGenerated]
	private void <Close>g__CompleteProcess|17_0()
	{
		Canvas canvas = this.canvas;
		int num = 0;
		canvas.enabled = num != 0;
		this.OnCloseCompleted();
		Action action = this.closedHandler;
		if (action != 0)
		{
			action();
			return;
		}
	}

	// Token: 0x0400209C RID: 8348
	[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
	[Token(Token = "0x400209C")]
	[SerializeField]
	protected Canvas canvas;

	// Token: 0x0400209D RID: 8349
	[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
	[Token(Token = "0x400209D")]
	[SerializeField]
	protected CanvasGroup canvasGroup;

	// Token: 0x0400209E RID: 8350
	[Cpp2IlInjected.FieldOffset(Offset = "0x28")]
	[Token(Token = "0x400209E")]
	[SerializeField]
	protected float fadeInDuration = 0.2f;

	// Token: 0x0400209F RID: 8351
	[Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x400209F")]
	[SerializeField]
	protected float fadeOutDuration = 0.2f;

	// Token: 0x040020A0 RID: 8352
	[Cpp2IlInjected.FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40020A0")]
	[SerializeField]
	private bool enableScaleEffect = true;

	// Token: 0x040020A1 RID: 8353
	[Cpp2IlInjected.FieldOffset(Offset = "0x34")]
	[Token(Token = "0x40020A1")]
	[SerializeField]
	protected float scaleInStart = 0.5f;

	// Token: 0x040020A2 RID: 8354
	[Cpp2IlInjected.FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40020A2")]
	[SerializeField]
	protected float scaleInDuration = 0.2f;

	// Token: 0x040020A3 RID: 8355
	[Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
	[Token(Token = "0x40020A3")]
	[SerializeField]
	private bool ignoreCancelInput;

	// Token: 0x040020A4 RID: 8356
	[Cpp2IlInjected.FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40020A4")]
	[SerializeField]
	protected UINavigator navigator;

	// Token: 0x040020A5 RID: 8357
	[Cpp2IlInjected.FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40020A5")]
	private Sequence seq;

	// Token: 0x040020A6 RID: 8358
	[Cpp2IlInjected.FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40020A6")]
	protected Action closedHandler;
}
