using Valg.EVA.Skanning.Entity.ReadModel;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Valg.EVA.Skanning.Repositories.Counting
{
    public interface ICountingRepository
    {
        ActiveCounting GetActiveCounting(string uniqueElectionAndContestId, string countingEmlAreaContextId, int? existingCountingId);

        ScannableCounting[] GetScannableCountings(string uniqueElectionAndContestId);

        BoxCounting GetBoxCounting(string barcodeLong, string barcodeShort, int countingId);

        BoxCounting GetBoxCountingById(int boxCountingId);

        List<Valg.EVA.Skanning.Entity.ReadModel.Counting> GetCountings(string electionEventId, string contestId, string countingEmlAreaContextId);

        List<BoxCounting> GetBoxCountingsByCountingId(int countingId);

        Valg.EVA.Skanning.Entity.ReadModel.Counting GetCountingByBoxCountingId(int boxCountingId);
       
        List<BoxCountingDetails> GetBoxCountingDetails(string electionEventId, string contestId, string countingEmlAreaContextId);

        bool AreThereAnyNonValidBallotPapersInThisCounting(int countingId);

        Valg.EVA.Skanning.Entity.ReadModel.Counting GetCounting(int countingId);

        ReadOnlyCollection<DuplicateBallotId> GetDuplicatesInCounting(int countingId);

        Valg.EVA.Skanning.Entity.ReadModel.Counting GetCountingByBallotPaperId(int ballotPaperId);
        ReadOnlyCollection<BallotWithBallotId> GetDuplicatedBallotsWithBallotId(int ballotId, int countingId);
    }
}
