using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ZionRobot.Models.Items;

namespace ZionRobot.Persistence
{
	// Token: 0x0200002A RID: 42
	public class Queues
	{
		// Token: 0x17000062 RID: 98
		// (get) Token: 0x0600010A RID: 266 RVA: 0x00007234 File Offset: 0x00005434
		internal List<ZionRobot.Models.Items.File> Files
		{
			get
			{
				bool flag = this.files == null;
				if (flag)
				{
					this.files = new List<ZionRobot.Models.Items.File>();
				}
				this.files.RemoveAll((ZionRobot.Models.Items.File file) => !System.IO.File.Exists(file.FullPath));
				(from file in this.files
				where file.Status == "INTEGRATED" && !file.Disposed
				select file).ToList<ZionRobot.Models.Items.File>().ForEach(delegate(ZionRobot.Models.Items.File file)
				{
					file.Dispose();
				});
				return this.files;
			}
		}

		// Token: 0x17000063 RID: 99
		// (get) Token: 0x0600010B RID: 267 RVA: 0x000072E4 File Offset: 0x000054E4
		internal List<ZionRobot.Models.Items.File> Extraction
		{
			get
			{
				bool flag = this.Files == null;
				List<ZionRobot.Models.Items.File> result;
				if (flag)
				{
					result = null;
				}
				else
				{
					this.extraction = (from x in this.Files
					where x.Status == "EXTRACTION"
					select x).ToList<ZionRobot.Models.Items.File>();
					result = this.extraction;
				}
				return result;
			}
		}

		// Token: 0x17000064 RID: 100
		// (get) Token: 0x0600010C RID: 268 RVA: 0x00007344 File Offset: 0x00005544
		internal List<ZionRobot.Models.Items.File> Integration
		{
			get
			{
				bool flag = this.Files == null;
				List<ZionRobot.Models.Items.File> result;
				if (flag)
				{
					result = null;
				}
				else
				{
					this.exportation = (from x in this.Files
					where x.Status == "INTEGRATION"
					select x).ToList<ZionRobot.Models.Items.File>();
					result = this.exportation;
				}
				return result;
			}
		}

		// Token: 0x17000065 RID: 101
		// (get) Token: 0x0600010D RID: 269 RVA: 0x000073A4 File Offset: 0x000055A4
		internal ZionRobot.Models.Items.File Integrated
		{
			get
			{
				bool flag = this.Files == null;
				ZionRobot.Models.Items.File result;
				if (flag)
				{
					result = null;
				}
				else
				{
					IEnumerable<ZionRobot.Models.Items.File> enumerable = from x in this.Files
					where x.Status == "INTEGRATED"
					select x;
					this.exportated = ((enumerable != null) ? enumerable.FirstOrDefault<ZionRobot.Models.Items.File>() : null);
					result = this.exportated;
				}
				return result;
			}
		}

		// Token: 0x0400005D RID: 93
		private List<ZionRobot.Models.Items.File> files;

		// Token: 0x0400005E RID: 94
		private List<ZionRobot.Models.Items.File> extraction;

		// Token: 0x0400005F RID: 95
		private List<ZionRobot.Models.Items.File> exportation;

		// Token: 0x04000060 RID: 96
		private ZionRobot.Models.Items.File exportated;
	}
}
