using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using DG.Tweening;
using MarsSDK;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x020002E4 RID: 740
[Token(Token = "0x20002E4")]
[RequireComponent(typeof(Canvas), typeof(CanvasGroup), typeof(GraphicRaycaster))]
public class UIMessageBox : GameCanvasBase
{
	// Token: 0x1700011E RID: 286
	// (get) Token: 0x06001B8B RID: 7051 RVA: 0x000431A8 File Offset: 0x000413A8
	[Token(Token = "0x1700011E")]
	public MessageBoxStyle Style
	{
		[Token(Token = "0x6001B8B")]
		[Address(RVA = "0x4229A0", Offset = "0x4219A0", VA = "0x1804229A0")]
		get
		{
			return this.style;
		}
	}

	// Token: 0x06001B8C RID: 7052 RVA: 0x000431BC File Offset: 0x000413BC
	[Token(Token = "0x6001B8C")]
	[Address(RVA = "0xE7A0D0", Offset = "0xE790D0", VA = "0x180E7A0D0", Slot = "11")]
	public override void Init()
	{
		UILabelHandler[] array = this.handlers;
		int num = 0;
		UILabelHandler[] array2;
		if (num < array.Length)
		{
			array[num].index = num;
			UILabelHandler uilabelHandler = this.handlers[num];
			Action<UIHandlerBase> action = new Action(this.OnHandlerSelected);
			uilabelHandler.onSelectedHandler = action;
			UILabelHandler uilabelHandler2 = this.handlers[num];
			Action<UIHandlerBase> action2 = new Action(this.OnHandlerDeselected);
			uilabelHandler2.onDeselectedHandler = action2;
			array2 = this.handlers;
			num++;
		}
		this.navigator.BindPointerEnterEvent(array2);
		UINavigator navigator = this.navigator;
		UILabelHandler[] array3 = this.handlers;
		navigator.BindPointerExitEvent(array3);
		if (this.handlers.Length > 1)
		{
			int num2 = 0;
			UINavigationSetter uinavigationSetter = UINavigationSetter.Get(UINavigationMode.Vertical, true, num2);
			UILabelHandler[] array4 = this.handlers;
			uinavigationSetter.Apply(array4);
		}
	}

	// Token: 0x06001B8D RID: 7053 RVA: 0x00043294 File Offset: 0x00041494
	[Token(Token = "0x6001B8D")]
	[Address(RVA = "0xE79E50", Offset = "0xE78E50", VA = "0x180E79E50")]
	public void ClearCloseEvent()
	{
		MessageBoxConfig messageBoxConfig = this.config;
		throw new NullReferenceException();
	}

	// Token: 0x06001B8E RID: 7054 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B8E")]
	[Address(RVA = "0xE7A5E0", Offset = "0xE795E0", VA = "0x180E7A5E0")]
	public void OpenMsgBox(MessageBoxConfig config)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B8F RID: 7055 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B8F")]
	[Address(RVA = "0xE79EB0", Offset = "0xE78EB0", VA = "0x180E79EB0")]
	private void InitMessageBox()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B90 RID: 7056 RVA: 0x000432B0 File Offset: 0x000414B0
	[Token(Token = "0x6001B90")]
	[Address(RVA = "0xE7A4E0", Offset = "0xE794E0", VA = "0x180E7A4E0")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.root.anchoredPosition = anchoredPosition;
		UILabelHandler[] array = this.handlers;
		UINavigationEffect uinavigationEffect2 = this.navigationEffect;
		int index = handler.index;
		UILabelHandler uilabelHandler = array[index];
		uinavigationEffect2.UpdateArrowPos(uilabelHandler);
		this.navigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001B91 RID: 7057 RVA: 0x0004331C File Offset: 0x0004151C
	[Token(Token = "0x6001B91")]
	[Address(RVA = "0x94CE70", Offset = "0x94BE70", VA = "0x18094CE70")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x06001B92 RID: 7058 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B92")]
	[Address(RVA = "0xE7A6D0", Offset = "0xE796D0", VA = "0x180E7A6D0")]
	private void PerformSubmissionEffect(int index)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B93 RID: 7059 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B93")]
	[Address(RVA = "0xE7A2F0", Offset = "0xE792F0", VA = "0x180E7A2F0")]
	private bool IsCancelable()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B94 RID: 7060 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B94")]
	[Address(RVA = "0xE7A490", Offset = "0xE79490", VA = "0x180E7A490", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B95 RID: 7061 RVA: 0x0004333C File Offset: 0x0004153C
	[Token(Token = "0x6001B95")]
	[Address(RVA = "0xE7A8D0", Offset = "0xE798D0", VA = "0x180E7A8D0", Slot = "21")]
	public override void Submit()
	{
		if (this.navigator.currentHandler)
		{
			int index = this.navigator.currentHandler.index;
			Action handlerEvent = this.config.handlerData[index].handlerEvent;
			if (handlerEvent != 0)
			{
				handlerEvent();
			}
			this.PerformSubmissionEffect(index);
			Game.PlayHandlerScaleEffect(this.navigator.currentHandler);
		}
	}

	// Token: 0x06001B96 RID: 7062 RVA: 0x000433AC File Offset: 0x000415AC
	[Token(Token = "0x6001B96")]
	[Address(RVA = "0xE79DD0", Offset = "0xE78DD0", VA = "0x180E79DD0", Slot = "23")]
	public override void Cancel()
	{
		if (this.config.closeHandler > (ulong)0L)
		{
			base.Close();
			Game.PlayCanvasSE(UICanvasSFX.Close);
			return;
		}
	}

	// Token: 0x06001B97 RID: 7063 RVA: 0x000433DC File Offset: 0x000415DC
	[Token(Token = "0x6001B97")]
	[Address(RVA = "0xE79E80", Offset = "0xE78E80", VA = "0x180E79E80", Slot = "15")]
	public override void ForceClose([Optional] Action closedHandler)
	{
		MessageBoxConfig messageBoxConfig = this.config;
		if (messageBoxConfig != 0)
		{
			messageBoxConfig.closeHandler = closedHandler;
		}
		base.Close();
	}

	// Token: 0x06001B98 RID: 7064 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001B98")]
	[Address(RVA = "0xE7A320", Offset = "0xE79320", VA = "0x180E7A320", Slot = "25")]
	public override void Localize(LocalizationData localizationData)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001B99 RID: 7065 RVA: 0x00043404 File Offset: 0x00041604
	[Token(Token = "0x6001B99")]
	[Address(RVA = "0x94D9C0", Offset = "0x94C9C0", VA = "0x18094D9C0")]
	public UIMessageBox()
	{
	}

	// Token: 0x04002577 RID: 9591
	[Cpp2IlInjected.FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4002577")]
	[SerializeField]
	private MessageBoxStyle style;

	// Token: 0x04002578 RID: 9592
	[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4002578")]
	[SerializeField]
	private Text title;

	// Token: 0x04002579 RID: 9593
	[Cpp2IlInjected.FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002579")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x0400257A RID: 9594
	[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
	[Token(Token = "0x400257A")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x0400257B RID: 9595
	[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
	[Token(Token = "0x400257B")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x0400257C RID: 9596
	[Cpp2IlInjected.FieldOffset(Offset = "0x80")]
	[Token(Token = "0x400257C")]
	private Sequence seq;

	// Token: 0x0400257D RID: 9597
	[Cpp2IlInjected.FieldOffset(Offset = "0x88")]
	[Token(Token = "0x400257D")]
	private MessageBoxConfig config;
}
