using Valg.EVA.Skanning.ContainerExtensions;
using System.Collections.Generic;

namespace Valg.EVA.Skanning.JobManagement.Startup.UI.Duplicates
{
    public class DuplicateBallotsViewModel : ReactiveViewModel
    {
        private readonly ITypedFactory typedFactory;

        public DuplicateBallotsViewModel(ITypedFactory typedFactory)
        {
            this.typedFactory = typedFactory;
        }

        public void Initialize(List<BoxViewModel> boxesInvolved)
        {
            BoxesSummaryViewModel = typedFactory.Create<BoxesSummaryViewModel>();
            BoxesSummaryViewModel.Initialize(boxesInvolved);
            DuplicateBallotsDetailsViewModel = typedFactory.Create<DuplicateBallotsDetailsViewModel>();
            DuplicateBallotsDetailsViewModel.Initialize(boxesInvolved);
        }

        public BoxesSummaryViewModel BoxesSummaryViewModel { get; private set; }

        public DuplicateBallotsDetailsViewModel DuplicateBallotsDetailsViewModel { get; private set; }

        public string Description => Valg.EVA.Skanning.Resources.Language.JobManagementLanguageString.DuplicatesGroupedByBox;
    }
}
