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

namespace ZionRobot.Models.Source
{
	// Token: 0x0200002A RID: 42
	public class ActionsElement
	{
		// Token: 0x17000070 RID: 112
		// (get) Token: 0x06000128 RID: 296 RVA: 0x00007A70 File Offset: 0x00005C70
		// (set) Token: 0x06000129 RID: 297 RVA: 0x00007A78 File Offset: 0x00005C78
		public string Name { get; set; }

		// Token: 0x17000071 RID: 113
		// (get) Token: 0x0600012A RID: 298 RVA: 0x00007A81 File Offset: 0x00005C81
		public List<Action> Actions { get; }

		// Token: 0x0600012B RID: 299 RVA: 0x00007A8C File Offset: 0x00005C8C
		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: 0x0600012C RID: 300 RVA: 0x00007B20 File Offset: 0x00005D20
		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;
		}
	}
}
