using Valg.EVA.Skanning.ServicesModel.ServiceContracts.Box.Read;
using Valg.EVA.Skanning.UserInterfaceElements.Counting;

namespace Valg.Eva.Skanning.Scan.Presentation.BoxInfo
{
    public class BoxViewModel
    {
        private readonly BoxCountingWithElectionData boxCountingWithElectionData;

        public BoxViewModel(BoxCountingWithElectionData boxCountingWithElectionData)
        {
            this.boxCountingWithElectionData = boxCountingWithElectionData;
        }

        public string BarcodeLong { get { return boxCountingWithElectionData.BoxCounting.BarcodeLong; } }
        public string BarcodeShort { get { return boxCountingWithElectionData.BoxCounting.BarcodeShort; } }
        public string Election { get { return boxCountingWithElectionData.Election; } }
        public string County { get { return boxCountingWithElectionData.County; } }
        public string Municipality { get { return boxCountingWithElectionData.Municipality; } }
        public string PollingDistrict { get { return boxCountingWithElectionData.PollingDistrict; } }
        public string Category { get { return boxCountingWithElectionData.Category; } }
        public int BoxNumber { get { return boxCountingWithElectionData.BoxNumber; } }
        public int TotalBoxes { get { return boxCountingWithElectionData.TotalBoxes; } }
        public string CountingName
        {
            get
            {
                return boxCountingWithElectionData.BoxCounting.CountingType.GetCountingDescription(boxCountingWithElectionData.BoxCounting.CountNumber);
            }
        }
    }
}
