using Microsoft.Extensions.Logging;
using Microsoft.Identity.Client;
using ZooContracts.BusinessLogicsContracts;
using ZooContracts.StoragesContracts;
using ZooContracts.ViewModels;
using ZooDatabaseImplement.Models;
using ZooDataModels.Models;
using ZooContracts.BindingModels;
using ZooContracts.BusinessLogicsContracts;

namespace ZooContracts.BusinessLogics
{
    public class ReportLogic : IReportLogic
    {
        private readonly IRouteStorage _RouteStorage;
        private readonly ILogger _logger;
        private readonly IRouteCostStorage _RouteCostStorage;

        public ReportLogic(ILogger logger, IRouteStorage RouteStorage,
            IRouteCostStorage RouteCostStorage)
        {
            _logger = logger;
            _RouteStorage = RouteStorage;
            _RouteCostStorage = RouteCostStorage;
        }
        /// <summary>
        ///  получение заповедников в маршруте
        /// </summary>
        public List<ReportRouteReservesViewModel> GetReserveRoutes(ReportBindingModel model)
        {
            return _RouteStorage.GetReserveRoutes(new() { SelectedRoutesIds = model.SelectedRoutes });
        }
        /// <summary>
        ///  получение затрат по маршруту
        /// </summary>
        public List<ReportCostsInRoutesViewModel> GetCosts(ReportBindingModel model)
        {
            return _RouteCostStorage.GetCostsInRoutes(new() { DateFrom = model.DateFrom, DateTo = model.DateTo });
        }
        public void SaveComponentsToWordFile(ReportBindingModel model)
        {
            throw new NotImplementedException();
        }

        public void SaveManufactureComponentToExcelFile(ReportBindingModel model)
        {
            throw new NotImplementedException();
        }

        public void SaveOrdersToPdfFile(ReportBindingModel model)
        {
            throw new NotImplementedException();
        }
    }
}