using System;
using System.Collections.Generic;
using System.Xml;

namespace ZionRobot.Models.Source
{
	// Token: 0x02000022 RID: 34
	public class ActionsElement
	{
		// Token: 0x17000051 RID: 81
		// (get) Token: 0x060000E2 RID: 226 RVA: 0x00006800 File Offset: 0x00004A00
		// (set) Token: 0x060000E3 RID: 227 RVA: 0x00006808 File Offset: 0x00004A08
		public string Name { get; set; }

		// Token: 0x17000052 RID: 82
		// (get) Token: 0x060000E4 RID: 228 RVA: 0x00006811 File Offset: 0x00004A11
		public List<Action> Actions { get; }

		// Token: 0x060000E5 RID: 229 RVA: 0x0000681C File Offset: 0x00004A1C
		public ActionsElement(XmlElement node)
		{
			this.Name = node.GetAttribute("Name");
			this.Actions = new List<Action>();
			foreach (object obj in node.SelectNodes("Action"))
			{
				XmlElement action = (XmlElement)obj;
				this.Actions.Add(new Action(action));
			}
		}

		// Token: 0x060000E6 RID: 230 RVA: 0x000068B0 File Offset: 0x00004AB0
		public XmlElement AppendTo(XmlDocument doc)
		{
			XmlElement root = doc.CreateElement("Actions");
			root.SetAttribute("Name", this.Name);
			this.Actions.ForEach(delegate(Action action)
			{
				root.AppendChild(action.AppendTo(doc));
			});
			return root;
		}
	}
}
