using BallotTemplates;

namespace InterpreterLibrary.Models
{
    public class Renumbering : Change
    {
        internal Renumbering(int candidateNumber, string text, float fillPercentage, ChangeField field) 
            : base(candidateNumber, text, fillPercentage, field)
        {
        }
        internal Renumbering(int candidateNumber, string text, float fillPercentage)
            : base(candidateNumber, text, fillPercentage, null)
        {
        }
        internal Renumbering(int candidateNumber, string text)
            : base(candidateNumber, text, 0, null)
        {
        }
        public override bool Equals(object obj)
        {
            if (obj is Renumbering compare)
                return CandidateNumber == compare.CandidateNumber && Text.Equals(compare.Text);
            return false;
        }

        public override int GetHashCode() => CandidateNumber;
    }
}
