using Valg.EVA.Skanning.ServicesModel.ElectionConfig.Model;
using Valg.EVA.Skanning.ServicesModel.Internal.BallotNumber;

namespace Valg.EVA.Skanning.ServicesModel.ServiceContracts.Verification.Read
{
    public class BallotNumberReadOnly
    {
        public BallotNumberReadOnly(string originalValue, bool neededVerification, bool needsVerification, string currentValue, bool ignoreCandidates)
        {
            OriginalValue = originalValue;
            NeededVerification = neededVerification;
            NeedsVerification = needsVerification;
            CurrentValue = currentValue;
            IgnoreCandidates = ignoreCandidates;
        }

        public string OriginalValue { get; }
        public bool NeededVerification { get; }

        public string CurrentValue { get; }
        public bool NeedsVerification { get; }

        public bool IgnoreCandidates { get; }

        public bool IsBlank => !NeedsVerification && Affiliation.IsProposedShortCodeBlankAffiliation(BallotNumberSplitter.GetAffiliationShortCode(CurrentValue));
    }
}
