using System;
using Valg.EVA.Skanning.Contracts.CommonEnums;
using Valg.EVA.Skanning.Entity.ReadModel;

namespace Valg.EVA.Skanning.ServicesModel.ServiceContracts.Count.Read
{
    public class Counting
    {
        public int Id { get; set; }

        public CountingType CountingType { get; set; }

        public CountingState CountingState { get; set; }

        public string UniqueId { get; set; }

        public string ContestId { get; set; }

        public string ElectionEventId { get; set; }

        public string EmlAreaContextId { get; set; }

        public string CountingEmlAreaContextId { get; set; }

        public string VotingCategory { get; set; }

        public string ElectionIdentifier { get; set; }

        public string ElectionGroup { get; set; }

        public int CountNumber { get; set; }

        public DateTime Modified { get; set; }

        public bool IsProcessedInEmergencyMode { get; set; }

        public bool IsCurrentlyCountedByTopLevelCountingAuthority()
        {
            return TopLevelCountingHelper.DoesCountingEmlAreaContextIdIndicateTopLevelCountingAuthority(CountingEmlAreaContextId);
        }
    }
}
