namespace MonoGame.FourEngine
{
    public class CancelableEventArgs : BasicEventArgs<bool>
    {
        public bool IsCanceled { get; private set; }
        public override bool Argument
        {
            get => IsCanceled;
            protected set => IsCanceled = value;
        }

        public CancelableEventArgs(object sender, bool argument = default) 
            : base(sender, argument)
        {
        }

        public void Cancel()
            => IsCanceled = true;

        public void Reset()
            => IsCanceled = false;
    }
}