/*
© 2017 Altavant Technologies Inc.
Web: http://www.altavant.com
*/

namespace Altavant.Fusion.UI.Events
{
	public enum EventType : byte
	{
		StatusBarTap,
		HardwareKey,
		Custom
	}

	public abstract class Event
	{
		protected bool _handled;
		protected bool _result;

		public abstract EventType Type { get; }

		public bool Handled
		{
			get
			{
				return _handled;
			}
			set
			{
				_handled = value;
			}
		}

		public bool Result
		{
			get
			{
				return _result;
			}
			set
			{
				_result = value;
			}
		}

		public void Handle(bool result)
		{
			_handled = true;
			_result = result;
		}

		public void Reset()
		{
			_handled = false;
			_result = false;
		}
	}
}