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

// Token: 0x02000299 RID: 665
[Token(Token = "0x2000299")]
[RequireComponent(typeof(Canvas), typeof(CanvasGroup), typeof(GraphicRaycaster))]
public class UIMessageBox : GameCanvasBase
{
	// Token: 0x1700010E RID: 270
	// (get) Token: 0x0600195E RID: 6494 RVA: 0x0003D7BC File Offset: 0x0003B9BC
	[Token(Token = "0x1700010E")]
	public MessageBoxStyle Style
	{
		[Token(Token = "0x600195E")]
		[Address(RVA = "0x3F0030", Offset = "0x3EEE30", VA = "0x1803F0030")]
		get
		{
			return this.style;
		}
	}

	// Token: 0x0600195F RID: 6495 RVA: 0x0003D7D0 File Offset: 0x0003B9D0
	[Token(Token = "0x600195F")]
	[Address(RVA = "0x1020FC0", Offset = "0x101FDC0", VA = "0x181020FC0", 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: 0x06001960 RID: 6496 RVA: 0x0003D8A8 File Offset: 0x0003BAA8
	[Token(Token = "0x6001960")]
	[Address(RVA = "0x1020D40", Offset = "0x101FB40", VA = "0x181020D40")]
	public void ClearCloseEvent()
	{
		MessageBoxConfig messageBoxConfig = this.config;
		throw new NullReferenceException();
	}

	// Token: 0x06001961 RID: 6497 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001961")]
	[Address(RVA = "0x10214D0", Offset = "0x10202D0", VA = "0x1810214D0")]
	public void OpenMsgBox(MessageBoxConfig config)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001962 RID: 6498 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001962")]
	[Address(RVA = "0x1020DA0", Offset = "0x101FBA0", VA = "0x181020DA0")]
	private void InitMessageBox()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001963 RID: 6499 RVA: 0x0003D8C4 File Offset: 0x0003BAC4
	[Token(Token = "0x6001963")]
	[Address(RVA = "0x10213D0", Offset = "0x10201D0", VA = "0x1810213D0")]
	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: 0x06001964 RID: 6500 RVA: 0x0003D930 File Offset: 0x0003BB30
	[Token(Token = "0x6001964")]
	[Address(RVA = "0x76AA60", Offset = "0x769860", VA = "0x18076AA60")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x06001965 RID: 6501 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001965")]
	[Address(RVA = "0x10215C0", Offset = "0x10203C0", VA = "0x1810215C0")]
	private void PerformSubmissionEffect(int index)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001966 RID: 6502 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001966")]
	[Address(RVA = "0x10211E0", Offset = "0x101FFE0", VA = "0x1810211E0")]
	private bool IsCancelable()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001967 RID: 6503 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001967")]
	[Address(RVA = "0x1021380", Offset = "0x1020180", VA = "0x181021380", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001968 RID: 6504 RVA: 0x0003D950 File Offset: 0x0003BB50
	[Token(Token = "0x6001968")]
	[Address(RVA = "0x10217C0", Offset = "0x10205C0", VA = "0x1810217C0", 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: 0x06001969 RID: 6505 RVA: 0x0003D9C0 File Offset: 0x0003BBC0
	[Token(Token = "0x6001969")]
	[Address(RVA = "0x1020CC0", Offset = "0x101FAC0", VA = "0x181020CC0", Slot = "23")]
	public override void Cancel()
	{
		if (this.config.closeHandler > (ulong)0L)
		{
			base.Close();
			Game.PlayCanvasSE(UICanvasSFX.Close);
			return;
		}
	}

	// Token: 0x0600196A RID: 6506 RVA: 0x0003D9F0 File Offset: 0x0003BBF0
	[Token(Token = "0x600196A")]
	[Address(RVA = "0x1020D70", Offset = "0x101FB70", VA = "0x181020D70", Slot = "15")]
	public override void ForceClose([Optional] Action closedHandler)
	{
		MessageBoxConfig messageBoxConfig = this.config;
		if (messageBoxConfig != 0)
		{
			messageBoxConfig.closeHandler = closedHandler;
		}
		base.Close();
	}

	// Token: 0x0600196B RID: 6507 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600196B")]
	[Address(RVA = "0x1021210", Offset = "0x1020010", VA = "0x181021210", Slot = "25")]
	public override void Localize(LocalizationData localizationData)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600196C RID: 6508 RVA: 0x0003DA18 File Offset: 0x0003BC18
	[Token(Token = "0x600196C")]
	[Address(RVA = "0x769BF0", Offset = "0x7689F0", VA = "0x180769BF0")]
	public UIMessageBox()
	{
	}

	// Token: 0x04002323 RID: 8995
	[Cpp2IlInjected.FieldOffset(Offset = "0x58")]
	[Token(Token = "0x4002323")]
	[SerializeField]
	private MessageBoxStyle style;

	// Token: 0x04002324 RID: 8996
	[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
	[Token(Token = "0x4002324")]
	[SerializeField]
	private Text title;

	// Token: 0x04002325 RID: 8997
	[Cpp2IlInjected.FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002325")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x04002326 RID: 8998
	[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4002326")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x04002327 RID: 8999
	[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4002327")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x04002328 RID: 9000
	[Cpp2IlInjected.FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002328")]
	private Sequence seq;

	// Token: 0x04002329 RID: 9001
	[Cpp2IlInjected.FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002329")]
	private MessageBoxConfig config;
}
