using Quadarax.Foundation.QConsole.Value;

namespace Quadarax.Foundation.QConsole.Argument
{
    public class FlagArgument : NamedArgument
    {
        public FlagArgument(string code, string description, string hint, bool defaultValue) : base(code, description, hint, TypeValuesEnum.Bool, defaultValue.ToString(), false)
        {
            Reset();
        }

        public void Set()
        {
            Value.Set(!(bool)DefaultValue.Get());
        }

        public void Reset()
        {
            Value.Set(DefaultValue.Get());
        }
    }
}
