#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

using System;

using Volpe.Cafe.Generic;
using Volpe.Cafe.Logging;
using Volpe.Cafe.MarketData.Design;
using Volpe.Cafe.ModelSettings;

namespace Volpe.Cafe.DfsSrModels.SalesEstimators
{
    /// <inheritdoc cref="SalesEstimator.UserDefinedForecast"/>
    [Serializable]
    public sealed class UserDefinedForecast : SalesEstimatorBase
    {
        /// <summary>
        /// Initializes a new instances of the <see cref="UserDefinedForecast"/> class, using the specified industry
        /// data, modeling settings, and log writer.
        /// </summary>
        /// <inheritdoc path="/param"/>
        /// <inheritdoc path="/exception"/>
        public UserDefinedForecast(IIndustry data, ModelingSettings settings, ILogger logWriter)
            : base(data, settings, logWriter)
        {
            this._annualForecastLd = settings.Parameters.SalesModelValues.AnnualForecastLD;
            this._annualForecastHdpuv = settings.Parameters.SalesModelValues.AnnualForecastHDPUV;
        }

        private IAnnualValue<double> _annualForecastLd;
        private IAnnualValue<double> _annualForecastHdpuv;

        public override double CalcNewLightDutySales(
            Scenario scen, int iteration, int year, ForecastFleet baseFleet, ForecastFleet scenFleet)
        {
            return this._annualForecastLd[year];
        }

        public override double CalcNewHdpuvSales(
            Scenario scen, int iteration, int year, ForecastFleet baseFleet, ForecastFleet scenFleet)
        {
            return this._annualForecastHdpuv[year];
        }

    }
}
