using InABox.Core;

namespace InABox.Rpc
{
    // ReSharper disable once InconsistentNaming
    public class RpcCheck2FAResult : IRpcCommandResult
    {
        public bool Valid { get; set; }
        
        public RpcCheck2FAResult()
        {
            Valid = false;
        }

        public void SerializeBinary(CoreBinaryWriter writer)
        {
            writer.Write(Valid);
        }

        public void DeserializeBinary(CoreBinaryReader reader)
        {
            Valid = reader.ReadBoolean();
        }

        public string? FullDescription() => Valid ? "success" : "failed";
    }
}