using Valg.EVA.Skanning.Contracts.CommonEnums;

namespace Valg.EVA.Skanning.Contracts
{
    public static class FieldTypeExtensions
    {
        public static bool IsBallotNoField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.BallotNo;
        }

        public static bool IsStampField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.Stamp;
        }

        public static bool IsBallotIdField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.BallotID;
        }

        public static bool IsRenumberField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.Ca_renumber;
        }

        public static bool IsStrikeoutField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.MarkDecr;
        }

        public static bool IsPartySelectionField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.Ref_opt;
        }

        public static bool IsCandidateField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.MarkIncr;
        }

        public static bool IsWriteInField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.Candidate;
        }

        public static bool IsMultipleStampsField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.Ref_single;
        }

        public static bool IsAffiliationNameField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.AffiliationName;
        }

        public static bool IsContestNameField(this IHaveFieldType fieldTypeImplementor)
        {
            return fieldTypeImplementor.FieldType == FieldType.ContestName;
        }
    }
}
