using Cryville.Common.Pdt;
using System.Collections.Generic;
using UnityEngine;

namespace Cryville.Crtr.Components {
	public abstract class SkinComponent : MonoBehaviour {
		/// <summary>
		/// The property operators of the component.
		/// </summary>
		public Dictionary<string, PdtOperator> PropOps { get; private set; }
		/// <summary>
		/// Submits a property.
		/// </summary>
		/// <param name="name">The name of the property.</param>
		/// <param name="property">The property operator.</param>
		protected void SubmitProperty(string name, PdtOperator property) {
			PropOps.Add(name, property);
		}

		/// <summary>
		/// Create a skin component
		/// </summary>
		protected SkinComponent() {
			// Properties = new Dictionary<string, Property>();
			PropOps = new Dictionary<string, PdtOperator>();
		}

		public virtual void Init() { }
		protected abstract void OnDestroy();
	}
}
