using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;

namespace AmplifyColor
{
	// Token: 0x02000680 RID: 1664
	[Token(Token = "0x2000680")]
	[Serializable]
	public class VolumeEffectFlags
	{
		// Token: 0x06003423 RID: 13347 RVA: 0x0006E668 File Offset: 0x0006C868
		[Token(Token = "0x6003423")]
		[Address(RVA = "0x4B7ED0", Offset = "0x4B6ED0", VA = "0x1804B7ED0")]
		public VolumeEffectFlags()
		{
			/*
An exception occurred when decompiling this method (06003423)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void AmplifyColor.VolumeEffectFlags::.ctor()

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	call:void(object::.ctor, ldloc:VolumeEffectFlags[exp:object](this)); 	stloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(var_0_0B, newobj:List`1[exp:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>](List`1::.ctor)); 	stfld:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(VolumeEffectFlags::components, ldloc:VolumeEffectFlags(this), ldloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(var_0_0B)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
		}

		// Token: 0x06003424 RID: 13348 RVA: 0x0006E688 File Offset: 0x0006C888
		[Token(Token = "0x6003424")]
		[Address(RVA = "0x4B7490", Offset = "0x4B6490", VA = "0x1804B7490")]
		public void AddComponent(Component c)
		{
			List<VolumeEffectComponentFlags> list = this.components;
			Predicate<VolumeEffectComponentFlags> predicate = delegate(VolumeEffectComponentFlags s)
			{
				Component c3 = c;
				string componentName = s.componentName;
				Type type = c3.GetType();
				if (type == 0 || type.ToString() == 0)
				{
				}
				return string.Equals(componentName, "");
			};
			VolumeEffectComponentFlags volumeEffectComponentFlags = list.Find(predicate);
			if (volumeEffectComponentFlags == 0)
			{
				List<VolumeEffectComponentFlags> list2 = this.components;
				VolumeEffectComponentFlags volumeEffectComponentFlags2 = new VolumeEffectComponentFlags(c);
				list2.Add(volumeEffectComponentFlags2);
				return;
			}
			Component c2 = c;
			volumeEffectComponentFlags.UpdateComponentFlags(c2);
			throw new NullReferenceException();
		}

		// Token: 0x06003425 RID: 13349 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003425")]
		[Address(RVA = "0x4B7C80", Offset = "0x4B6C80", VA = "0x1804B7C80")]
		public void UpdateFlags(VolumeEffect effectVol)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003426 RID: 13350 RVA: 0x0006E6F8 File Offset: 0x0006C8F8
		[Token(Token = "0x6003426")]
		[Address(RVA = "0x4B7AE0", Offset = "0x4B6AE0", VA = "0x1804B7AE0")]
		public static void UpdateCamFlags(AmplifyColorBase[] effects, AmplifyColorVolumeBase[] volumes)
		{
			int num = 0;
			int num2 = 0;
			int length = effects.Length;
			if (num2 < length)
			{
				AmplifyColorBase amplifyColorBase = effects[num];
				VolumeEffectFlags volumeEffectFlags = new VolumeEffectFlags();
				List<VolumeEffectComponentFlags> list = new List();
				volumeEffectFlags.components = list;
				amplifyColorBase.EffectFlags = volumeEffectFlags;
				int num3 = 0;
				if (num3 < volumes.Length)
				{
					VolumeEffect volumeEffect = volumes[num3].EffectContainer.FindVolumeEffect(amplifyColorBase);
					if (volumeEffect != 0)
					{
						amplifyColorBase.EffectFlags.UpdateFlags(volumeEffect);
					}
					num3++;
				}
				num++;
			}
		}

		// Token: 0x06003427 RID: 13351 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003427")]
		[Address(RVA = "0x4B76F0", Offset = "0x4B66F0", VA = "0x1804B76F0")]
		public VolumeEffect GenerateEffectData(AmplifyColorBase go)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003428 RID: 13352 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003428")]
		[Address(RVA = "0x4B7600", Offset = "0x4B6600", VA = "0x1804B7600")]
		public VolumeEffectComponentFlags FindComponentFlags(string compName)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003429 RID: 13353 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003429")]
		[Address(RVA = "0x4B78B0", Offset = "0x4B68B0", VA = "0x1804B78B0")]
		public string[] GetComponentNames()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003E08 RID: 15880
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003E08")]
		public List<VolumeEffectComponentFlags> components;
	}
}
