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.InputSystem;
using UnityEngine.UI;

// Token: 0x02000272 RID: 626
[Token(Token = "0x2000272")]
[RequireComponent(typeof(Canvas), typeof(CanvasGroup), typeof(GraphicRaycaster))]
public abstract class GameCanvasBase : MonoBehaviour, IUIController
{
	// Token: 0x170000E2 RID: 226
	// (get) Token: 0x06001747 RID: 5959 RVA: 0x00034ECC File Offset: 0x000330CC
	[Token(Token = "0x170000E2")]
	public bool Enabled
	{
		[Token(Token = "0x6001747")]
		[Address(RVA = "0x36C1E0", Offset = "0x36B1E0", VA = "0x18036C1E0")]
		get
		{
			return this.canvas.enabled;
		}
	}

	// Token: 0x06001748 RID: 5960
	[Token(Token = "0x6001748")]
	[Address(Slot = "11")]
	public abstract void Init();

	// Token: 0x06001749 RID: 5961 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001749")]
	[Address(RVA = "0x36B6B0", Offset = "0x36A6B0", VA = "0x18036B6B0", Slot = "12")]
	protected virtual void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600174A RID: 5962 RVA: 0x00034EEC File Offset: 0x000330EC
	[Token(Token = "0x600174A")]
	[Address(RVA = "0x36BAB0", Offset = "0x36AAB0", VA = "0x18036BAB0", Slot = "13")]
	protected virtual void Hide(Action completeHandler)
	{
		this.navigator.UnbindHandlerMovedEvent();
		Game.UnbindUIController();
		GameInputManager input = Game.input;
		InputActionMap gameplayActionMap = input.gameplayActionMap;
		int num = 0;
		gameplayActionMap.FindAction("PauseMenu", num != 0).Disable();
		InputActionMap uiControlActionMap = input.uiControlActionMap;
		int num2 = 0;
		uiControlActionMap.FindAction("PauseMenu", num2 != 0).Disable();
		Sequence sequence = this.seq;
		if (sequence != 0)
		{
			int num3 = 0;
			sequence.Kill(num3 != 0);
		}
		float num4 = this.fadeOutDuration;
		CanvasGroup canvasGroup = this.canvasGroup;
		int num5 = 0;
		TweenerCore<float, float, FloatOptions> tweenerCore = DOTweenModuleUI.DOFade(canvasGroup, (float)num5, num4).SetUpdate(true);
		TweenCallback tweenCallback = delegate
		{
			CanvasGroup canvasGroup2 = this.canvasGroup;
			int num6 = 0;
			canvasGroup2.blocksRaycasts = num6 != 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: 0x0600174B RID: 5963 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600174B")]
	[Address(RVA = "0x36BD40", Offset = "0x36AD40", VA = "0x18036BD40")]
	public void Open(Action closedHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600174C RID: 5964 RVA: 0x00034FC4 File Offset: 0x000331C4
	[Token(Token = "0x600174C")]
	[Address(RVA = "0x36B9F0", Offset = "0x36A9F0", VA = "0x18036B9F0")]
	public void Close()
	{
		this.Lock();
		Action action = new Action(this.<Close>g__CompleteProcess|17_0);
		this.Init();
	}

	// Token: 0x0600174D RID: 5965 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600174D")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "14")]
	protected virtual void OnCloseCompleted()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600174E RID: 5966 RVA: 0x00034FEC File Offset: 0x000331EC
	[Token(Token = "0x600174E")]
	[Address(RVA = "0x36BA80", Offset = "0x36AA80", VA = "0x18036BA80", Slot = "15")]
	public virtual void ForceClose([Optional] Action closedHandler)
	{
		this.closedHandler = closedHandler;
		this.Close();
	}

	// Token: 0x0600174F RID: 5967 RVA: 0x00035008 File Offset: 0x00033208
	[Token(Token = "0x600174F")]
	[Address(RVA = "0x36BD10", Offset = "0x36AD10", VA = "0x18036BD10", Slot = "16")]
	protected virtual void Lock()
	{
		CanvasGroup canvasGroup = this.canvasGroup;
		int num = 0;
		canvasGroup.blocksRaycasts = num != 0;
	}

	// Token: 0x06001750 RID: 5968 RVA: 0x0003502C File Offset: 0x0003322C
	[Token(Token = "0x6001750")]
	[Address(RVA = "0x36C090", Offset = "0x36B090", VA = "0x18036C090", Slot = "17")]
	protected virtual void Unlock()
	{
		this.canvasGroup.blocksRaycasts = true;
	}

	// Token: 0x06001751 RID: 5969 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001751")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "18")]
	public virtual void Move(Direction2D direction)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001752 RID: 5970 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001752")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "19")]
	public virtual void SwitchLeftward()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001753 RID: 5971 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001753")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "20")]
	public virtual void SwitchRightward()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001754 RID: 5972 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001754")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "21")]
	public virtual void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001755 RID: 5973 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001755")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "22")]
	public virtual void Hold(bool onHolding)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001756 RID: 5974 RVA: 0x0003504C File Offset: 0x0003324C
	[Token(Token = "0x6001756")]
	[Address(RVA = "0x36B980", Offset = "0x36A980", VA = "0x18036B980", Slot = "23")]
	public virtual void Cancel()
	{
		if (!this.ignoreCancelInput)
		{
			this.Close();
			Game.PlayCanvasSE(UICanvasSFX.Close);
			return;
		}
	}

	// Token: 0x06001757 RID: 5975 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001757")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "24")]
	public virtual void SpecialAction()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001758 RID: 5976 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001758")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "25")]
	public virtual void Localize(LocalizationData data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001759 RID: 5977 RVA: 0x00035070 File Offset: 0x00033270
	[Token(Token = "0x6001759")]
	[Address(RVA = "0x36BDF0", Offset = "0x36ADF0", VA = "0x18036BDF0")]
	public void SetScaleEffectDisplay(bool enabled)
	{
		this.enableScaleEffect = enabled;
	}

	// Token: 0x0600175A RID: 5978 RVA: 0x00035084 File Offset: 0x00033284
	[Token(Token = "0x600175A")]
	[Address(RVA = "0x36C0C0", Offset = "0x36B0C0", VA = "0x18036C0C0")]
	private void UpdateCursorPosition(UIHandlerBase handler)
	{
		Vector2 overlayScreenPoint = handler.rectTransform.GetOverlayScreenPoint();
		GameInputManager input = Game.input;
		input.cursorPosition = overlayScreenPoint;
		input.cursorPosition.y = (float)0;
	}

	// Token: 0x0600175B RID: 5979 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600175B")]
	[Address(RVA = "0x36BE00", Offset = "0x36AE00", VA = "0x18036BE00")]
	protected void SimpleAppear()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600175C RID: 5980 RVA: 0x000350BC File Offset: 0x000332BC
	[Token(Token = "0x600175C")]
	[Address(RVA = "0x36BFA0", Offset = "0x36AFA0", VA = "0x18036BFA0")]
	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: 0x0600175D RID: 5981 RVA: 0x00035120 File Offset: 0x00033320
	[Token(Token = "0x600175D")]
	[Address(RVA = "0x36C1B0", Offset = "0x36B1B0", VA = "0x18036C1B0")]
	protected GameCanvasBase()
	{
	}

	// Token: 0x0600175E RID: 5982 RVA: 0x00035168 File Offset: 0x00033368
	[Token(Token = "0x600175E")]
	[Address(RVA = "0x36C040", Offset = "0x36B040", VA = "0x18036C040")]
	[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: 0x040022CD RID: 8909
	[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40022CD")]
	[SerializeField]
	protected Canvas canvas;

	// Token: 0x040022CE RID: 8910
	[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40022CE")]
	[SerializeField]
	protected CanvasGroup canvasGroup;

	// Token: 0x040022CF RID: 8911
	[Cpp2IlInjected.FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40022CF")]
	[SerializeField]
	protected float fadeInDuration = 0.2f;

	// Token: 0x040022D0 RID: 8912
	[Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x40022D0")]
	[SerializeField]
	protected float fadeOutDuration = 0.2f;

	// Token: 0x040022D1 RID: 8913
	[Cpp2IlInjected.FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40022D1")]
	[SerializeField]
	private bool enableScaleEffect = true;

	// Token: 0x040022D2 RID: 8914
	[Cpp2IlInjected.FieldOffset(Offset = "0x34")]
	[Token(Token = "0x40022D2")]
	[SerializeField]
	protected float scaleInStart = 0.5f;

	// Token: 0x040022D3 RID: 8915
	[Cpp2IlInjected.FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40022D3")]
	[SerializeField]
	protected float scaleInDuration = 0.2f;

	// Token: 0x040022D4 RID: 8916
	[Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
	[Token(Token = "0x40022D4")]
	[SerializeField]
	private bool ignoreCancelInput;

	// Token: 0x040022D5 RID: 8917
	[Cpp2IlInjected.FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40022D5")]
	[SerializeField]
	protected UINavigator navigator;

	// Token: 0x040022D6 RID: 8918
	[Cpp2IlInjected.FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40022D6")]
	private Sequence seq;

	// Token: 0x040022D7 RID: 8919
	[Cpp2IlInjected.FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40022D7")]
	protected Action closedHandler;
}
