using System;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000245 RID: 581
[Token(Token = "0x2000245")]
public class UISettingsCamera : UIValueBindingBase
{
	// Token: 0x0600166D RID: 5741 RVA: 0x000345B4 File Offset: 0x000327B4
	[Token(Token = "0x600166D")]
	[Address(RVA = "0x18A0000", Offset = "0x189EE00", VA = "0x1818A0000", Slot = "11")]
	public override void Init(CanvasGroup mainCanvasGroup, Action cancelHandler, Text title)
	{
		UIValueBindingHandler uivalueBindingHandler9;
		Action<int> action9;
		string[] array9;
		for (;;)
		{
			base.Init(mainCanvasGroup, cancelHandler, title);
			UIValueBindingHandler uivalueBindingHandler = this.topHandlers[0];
			Action<int> action = new Action(this.OnCameraDistanceValueChanged);
			string[] array = new string[5];
			if ("1" == 0 || array != 0)
			{
				array[0] = "1";
				if ("2" == 0 || "2" != 0)
				{
					array[1] = "2";
					if ("3" == 0 || "3" != 0)
					{
						array[2] = "3";
						if ("4" == 0 || "4" != 0)
						{
							array[3] = "4";
							if ("5" == 0 || "5" != 0)
							{
								array[4] = "5";
								uivalueBindingHandler.Init(action, array);
								UIValueBindingHandler uivalueBindingHandler2 = this.topHandlers[1];
								Action<int> action2 = new Action(this.OnReverseCameraHorizontallyValueChanged);
								string[] array2 = new string[2];
								if ("OFF" == 0 || array2 != 0)
								{
									array2[0] = "OFF";
									if ("ON" == 0 || "ON" != 0)
									{
										array2[1] = "ON";
										uivalueBindingHandler2.Init(action2, array2);
										UIValueBindingHandler uivalueBindingHandler3 = this.topHandlers[2];
										Action<int> action3 = new Action(this.OnReverseCameraVerticallyValueChanged);
										string[] array3 = new string[2];
										if ("OFF" == 0 || array3 != 0)
										{
											array3[0] = "OFF";
											if ("ON" == 0 || "ON" != 0)
											{
												array3[1] = "ON";
												uivalueBindingHandler3.Init(action3, array3);
												UIValueBindingHandler uivalueBindingHandler4 = this.topHandlers[3];
												Action<int> action4 = new Action(this.OnReverseAimHorizontallyValueChanged);
												string[] array4 = new string[2];
												if ("OFF" == 0 || array4 != 0)
												{
													array4[0] = "OFF";
													if ("ON" == 0 || "ON" != 0)
													{
														array4[1] = "ON";
														uivalueBindingHandler4.Init(action4, array4);
														UIValueBindingHandler uivalueBindingHandler5 = this.topHandlers[4];
														Action<int> action5 = new Action(this.OnReverseAimVerticallyValueChanged);
														string[] array5 = new string[2];
														if ("OFF" == 0 || array5 != 0)
														{
															array5[0] = "OFF";
															if ("ON" == 0 || "ON" != 0)
															{
																array5[1] = "ON";
																uivalueBindingHandler5.Init(action5, array5);
																UIValueBindingHandler uivalueBindingHandler6 = this.topHandlers[5];
																Action<int> action6 = new Action(this.OnCameraRotationSpeedValueChanged);
																string[] array6 = new string[10];
																if ("1" == 0 || array6 != 0)
																{
																	array6[0] = "1";
																	if ("2" == 0 || "2" != 0)
																	{
																		array6[1] = "2";
																		if ("3" == 0 || "3" != 0)
																		{
																			array6[2] = "3";
																			if ("4" == 0 || "4" != 0)
																			{
																				array6[3] = "4";
																				if ("5" == 0 || "5" != 0)
																				{
																					array6[4] = "5";
																					if ("6" == 0 || "6" != 0)
																					{
																						array6[5] = "6";
																						if ("7" == 0 || "7" != 0)
																						{
																							array6[6] = "7";
																							if ("8" == 0 || "8" != 0)
																							{
																								array6[7] = "8";
																								if ("9" == 0 || "9" != 0)
																								{
																									array6[8] = "9";
																									if ("10" == 0 || "10" != 0)
																									{
																										array6[9] = "10";
																										uivalueBindingHandler6.Init(action6, array6);
																										UIValueBindingHandler uivalueBindingHandler7 = this.topHandlers[6];
																										Action<int> action7 = new Action(this.OnAimRotationSpeedValueChanged);
																										string[] array7 = new string[10];
																										if ("x0.2" == 0 || array7 != 0)
																										{
																											array7[0] = "x0.2";
																											if ("x0.4" == 0 || "x0.4" != 0)
																											{
																												array7[1] = "x0.4";
																												if ("x0.6" == 0 || "x0.6" != 0)
																												{
																													array7[2] = "x0.6";
																													if ("x0.8" == 0 || "x0.8" != 0)
																													{
																														array7[3] = "x0.8";
																														if ("x1" == 0 || "x1" != 0)
																														{
																															array7[4] = "x1";
																															if ("x1.2" == 0 || "x1.2" != 0)
																															{
																																array7[5] = "x1.2";
																																if ("x1.4" == 0 || "x1.4" != 0)
																																{
																																	array7[6] = "x1.4";
																																	if ("x1.6" == 0 || "x1.6" != 0)
																																	{
																																		array7[7] = "x1.6";
																																		if ("x1.8" == 0 || "x1.8" != 0)
																																		{
																																			array7[8] = "x1.8";
																																			if ("x2" == 0 || "x2" != 0)
																																			{
																																				array7[9] = "x2";
																																				uivalueBindingHandler7.Init(action7, array7);
																																				UIValueBindingHandler uivalueBindingHandler8 = this.topHandlers[7];
																																				Action<int> action8 = new Action(this.OnAimAssistanceValueChanged);
																																				string[] array8 = new string[2];
																																				if ("OFF" == 0 || array8 != 0)
																																				{
																																					array8[0] = "OFF";
																																					if ("ON" == 0 || "ON" != 0)
																																					{
																																						array8[1] = "ON";
																																						uivalueBindingHandler8.Init(action8, array8);
																																						uivalueBindingHandler9 = this.topHandlers[8];
																																						action9 = new Action(this.OnAutoSwitchAimTargetValueChanged);
																																						array9 = new string[2];
																																						if ("OFF" == 0 || array9 != 0)
																																						{
																																							array9[0] = "OFF";
																																							if ("ON" == 0 || "ON" != 0)
																																							{
																																								break;
																																							}
																																						}
																																					}
																																				}
																																			}
																																		}
																																	}
																																}
																															}
																														}
																													}
																												}
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		array9[1] = "ON";
		uivalueBindingHandler9.Init(action9, array9);
		UIValueBindingHandler[] topHandlers = this.topHandlers;
		base.InitHandlers(topHandlers);
	}

	// Token: 0x0600166E RID: 5742 RVA: 0x00034BFC File Offset: 0x00032DFC
	[Token(Token = "0x600166E")]
	[Address(RVA = "0x18A1D80", Offset = "0x18A0B80", VA = "0x1818A1D80")]
	private void OnCameraDistanceValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		int num = Mathf.Clamp(value + 1, 1, 5);
		cameraSettings.cameraDistance = num;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x0600166F RID: 5743 RVA: 0x00034C3C File Offset: 0x00032E3C
	[Token(Token = "0x600166F")]
	[Address(RVA = "0x18A1FC0", Offset = "0x18A0DC0", VA = "0x1818A1FC0")]
	private void OnReverseCameraHorizontallyValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.reverseCameraHorizontally = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001670 RID: 5744 RVA: 0x00034C78 File Offset: 0x00032E78
	[Token(Token = "0x6001670")]
	[Address(RVA = "0x18A2040", Offset = "0x18A0E40", VA = "0x1818A2040")]
	private void OnReverseCameraVerticallyValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.reverseCameraVertically = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001671 RID: 5745 RVA: 0x00034CB4 File Offset: 0x00032EB4
	[Token(Token = "0x6001671")]
	[Address(RVA = "0x18A1EC0", Offset = "0x18A0CC0", VA = "0x1818A1EC0")]
	private void OnReverseAimHorizontallyValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.reverseAimHorizontally = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001672 RID: 5746 RVA: 0x00034CF0 File Offset: 0x00032EF0
	[Token(Token = "0x6001672")]
	[Address(RVA = "0x18A1F40", Offset = "0x18A0D40", VA = "0x1818A1F40")]
	private void OnReverseAimVerticallyValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.reverseAimVertically = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001673 RID: 5747 RVA: 0x00034D2C File Offset: 0x00032F2C
	[Token(Token = "0x6001673")]
	[Address(RVA = "0x18A1E20", Offset = "0x18A0C20", VA = "0x1818A1E20")]
	private void OnCameraRotationSpeedValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		int num = Mathf.Clamp(value + 1, 1, 10);
		cameraSettings.cameraRotationSpeed = num;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001674 RID: 5748 RVA: 0x00034D6C File Offset: 0x00032F6C
	[Token(Token = "0x6001674")]
	[Address(RVA = "0x18A1C60", Offset = "0x18A0A60", VA = "0x1818A1C60")]
	private void OnAimRotationSpeedValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		int num = Mathf.Clamp(value + 1, 1, 10);
		cameraSettings.aimRotationSpeed = num;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001675 RID: 5749 RVA: 0x00034DAC File Offset: 0x00032FAC
	[Token(Token = "0x6001675")]
	[Address(RVA = "0x18A1BE0", Offset = "0x18A09E0", VA = "0x1818A1BE0")]
	private void OnAimAssistanceValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.aimAssistance = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001676 RID: 5750 RVA: 0x00034DE8 File Offset: 0x00032FE8
	[Token(Token = "0x6001676")]
	[Address(RVA = "0x18A1D00", Offset = "0x18A0B00", VA = "0x1818A1D00")]
	private void OnAutoSwitchAimTargetValueChanged(int value)
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings;
		bool flag = value == 1;
		cameraSettings.autoSwitchAimTarget = flag;
		Game.EmitCameraSettingsChangedEvent();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001677 RID: 5751 RVA: 0x00034E24 File Offset: 0x00033024
	[Token(Token = "0x6001677")]
	[Address(RVA = "0x18A1560", Offset = "0x18A0360", VA = "0x1818A1560", Slot = "20")]
	public override void Localize(LocalizationData data)
	{
		string text = data.systemText.GetText(92);
		this.titleText = text;
		UIValueBindingHandler[] topHandlers = this.topHandlers;
		GameTextData systemText = data.systemText;
		UIValueBindingHandler uivalueBindingHandler = topHandlers[0];
		string text2 = systemText.GetText(109);
		uivalueBindingHandler.UpdateLabelText(text2);
		UIValueBindingHandler[] topHandlers2 = this.topHandlers;
		GameTextData systemText2 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler2 = topHandlers2[1];
		string text3 = systemText2.GetText(110);
		uivalueBindingHandler2.UpdateLabelText(text3);
		UIValueBindingHandler[] topHandlers3 = this.topHandlers;
		GameTextData systemText3 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler3 = topHandlers3[2];
		string text4 = systemText3.GetText(111);
		uivalueBindingHandler3.UpdateLabelText(text4);
		UIValueBindingHandler[] topHandlers4 = this.topHandlers;
		GameTextData systemText4 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler4 = topHandlers4[3];
		string text5 = systemText4.GetText(176);
		uivalueBindingHandler4.UpdateLabelText(text5);
		UIValueBindingHandler[] topHandlers5 = this.topHandlers;
		GameTextData systemText5 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler5 = topHandlers5[4];
		string text6 = systemText5.GetText(177);
		uivalueBindingHandler5.UpdateLabelText(text6);
		UIValueBindingHandler[] topHandlers6 = this.topHandlers;
		GameTextData systemText6 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler6 = topHandlers6[5];
		string text7 = systemText6.GetText(240);
		uivalueBindingHandler6.UpdateLabelText(text7);
		UIValueBindingHandler[] topHandlers7 = this.topHandlers;
		GameTextData systemText7 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler7 = topHandlers7[6];
		string text8 = systemText7.GetText(241);
		uivalueBindingHandler7.UpdateLabelText(text8);
		UIValueBindingHandler[] topHandlers8 = this.topHandlers;
		GameTextData systemText8 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler8 = topHandlers8[7];
		string text9 = systemText8.GetText(242);
		uivalueBindingHandler8.UpdateLabelText(text9);
		UIValueBindingHandler[] topHandlers9 = this.topHandlers;
		GameTextData systemText9 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler9 = topHandlers9[8];
		string text10 = systemText9.GetText(115);
		uivalueBindingHandler9.UpdateLabelText(text10);
		UIValueBindingHandler[] topHandlers10 = this.topHandlers;
		GameTextData systemText10 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler10 = topHandlers10[1];
		string[] switchText = base.GetSwitchText(systemText10);
		uivalueBindingHandler10.UpdateValueText(switchText);
		UIValueBindingHandler[] topHandlers11 = this.topHandlers;
		GameTextData systemText11 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler11 = topHandlers11[2];
		string[] switchText2 = base.GetSwitchText(systemText11);
		uivalueBindingHandler11.UpdateValueText(switchText2);
		UIValueBindingHandler[] topHandlers12 = this.topHandlers;
		GameTextData systemText12 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler12 = topHandlers12[3];
		string[] switchText3 = base.GetSwitchText(systemText12);
		uivalueBindingHandler12.UpdateValueText(switchText3);
		UIValueBindingHandler[] topHandlers13 = this.topHandlers;
		GameTextData systemText13 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler13 = topHandlers13[4];
		string[] switchText4 = base.GetSwitchText(systemText13);
		uivalueBindingHandler13.UpdateValueText(switchText4);
		UIValueBindingHandler[] topHandlers14 = this.topHandlers;
		GameTextData systemText14 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler14 = topHandlers14[7];
		string[] switchText5 = base.GetSwitchText(systemText14);
		uivalueBindingHandler14.UpdateValueText(switchText5);
		UIValueBindingHandler[] topHandlers15 = this.topHandlers;
		GameTextData systemText15 = data.systemText;
		UIValueBindingHandler uivalueBindingHandler15 = topHandlers15[8];
		string[] switchText6 = base.GetSwitchText(systemText15);
		uivalueBindingHandler15.UpdateValueText(switchText6);
		GameTextData systemText16 = data.systemText;
		UILabelHandler resetHandler = this.resetHandler;
		string text11 = systemText16.GetText(15);
		resetHandler.SetLabel(text11);
		GameTextData systemText17 = data.systemText;
		UILabelHandler backHandler = this.backHandler;
		string text12 = systemText17.GetText(12);
		backHandler.SetLabel(text12);
		UIValueBindingHandler[] topHandlers16 = this.topHandlers;
		int num = 0;
		int length = topHandlers16.Length;
		if (num < length)
		{
			UIValueBindingHandler uivalueBindingHandler16 = topHandlers16[num];
			GameFontPack fontPack = data.fontPack;
			uivalueBindingHandler16.UpdateFont(fontPack);
			num++;
		}
		GameFontPack fontPack2 = data.fontPack;
		UILabelHandler resetHandler2 = this.resetHandler;
		Font medium = fontPack2.medium;
		resetHandler2.SetFont(medium);
		GameFontPack fontPack3 = data.fontPack;
		UILabelHandler backHandler2 = this.backHandler;
		Font medium2 = fontPack3.medium;
		backHandler2.SetFont(medium2);
	}

	// Token: 0x06001678 RID: 5752 RVA: 0x000351CC File Offset: 0x000333CC
	[Token(Token = "0x6001678")]
	[Address(RVA = "0x189FA60", Offset = "0x189E860", VA = "0x18189FA60", Slot = "23")]
	protected override ValueType[] GetConfigValues()
	{
		ValueType[] array;
		bool flag2;
		for (;;)
		{
			array = new ValueType[9];
			int cameraDistance = Game.Config.cameraSettings.cameraDistance;
			if (cameraDistance == 0 || cameraDistance != 0)
			{
				array[0] = cameraDistance;
				bool flag = Game.Config.cameraSettings.reverseCameraHorizontally;
				if (!flag || flag)
				{
					array[1] = flag;
					bool reverseCameraVertically = Game.Config.cameraSettings.reverseCameraVertically;
					flag = reverseCameraVertically;
					if (!reverseCameraVertically || reverseCameraVertically)
					{
						array[2] = flag;
						bool reverseAimHorizontally = Game.Config.cameraSettings.reverseAimHorizontally;
						flag = reverseAimHorizontally;
						if (!reverseAimHorizontally || reverseAimHorizontally)
						{
							array[3] = flag;
							bool reverseAimVertically = Game.Config.cameraSettings.reverseAimVertically;
							flag = reverseAimVertically;
							if (!reverseAimVertically || reverseAimVertically)
							{
								array[4] = flag;
								int num = Game.Config.cameraSettings.cameraRotationSpeed;
								if (num == 0 || num != 0)
								{
									array[5] = num;
									int aimRotationSpeed = Game.Config.cameraSettings.aimRotationSpeed;
									num = aimRotationSpeed;
									if (aimRotationSpeed == 0 || aimRotationSpeed != 0)
									{
										array[6] = num;
										flag2 = Game.Config.cameraSettings.aimAssistance;
										if (!flag2 || flag2)
										{
											array[7] = flag2;
											bool autoSwitchAimTarget = Game.Config.cameraSettings.autoSwitchAimTarget;
											flag2 = autoSwitchAimTarget;
											if (!autoSwitchAimTarget || autoSwitchAimTarget)
											{
												break;
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		array[8] = flag2;
		return array;
	}

	// Token: 0x06001679 RID: 5753 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001679")]
	[Address(RVA = "0x18A2150", Offset = "0x18A0F50", VA = "0x1818A2150", Slot = "24")]
	protected override void UpdateTopHandlers()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600167A RID: 5754 RVA: 0x00035368 File Offset: 0x00033568
	[Token(Token = "0x600167A")]
	[Address(RVA = "0x18A20C0", Offset = "0x18A0EC0", VA = "0x1818A20C0", Slot = "25")]
	protected override void SetDefault()
	{
		CameraSettings cameraSettings = Game.Config.cameraSettings.SetDefault();
		Game.EmitCameraSettingsChangedEvent();
		((IUIController)this).SwitchLeftward();
	}

	// Token: 0x0600167B RID: 5755 RVA: 0x0003539C File Offset: 0x0003359C
	[Token(Token = "0x600167B")]
	[Address(RVA = "0x384B20", Offset = "0x383920", VA = "0x180384B20")]
	public UISettingsCamera()
	{
	}
}
