using System;
using Volpe.Cafe.ModelSettings;
using Volpe.Cafe.Reporting.Generators;

namespace Volpe.Cafe.Reporting.ModelingReports
{
    /// <summary>
    /// Provides support for generating a <b>societal costs</b> modeling report.
    /// </summary>
    [Serializable]
    public class SocietalCostsReport : ModelingReport
    {
        /// <inheritdoc cref="ModelingReport(string, bool, Func{string[]})"/>
        public SocietalCostsReport(string path, bool append = false)
            : base(path, append, GetHeaders) { }

        /// <inheritdoc/>
        public override ReportDataGenerator GetDataGenerator(
            Scenario scen, ReportingData data, ModelingSettings settings)
        {
            return new SocietalCostsReportDataGenerator(scen, data, settings);
        }

        private static new string[] GetHeaders()
        {
            string[] headersPrefix = { "Scenario", "Scenario Name", "Model Year" };

            return ReportUtils.GetSocietalCostsReportHeaders(headersPrefix);
        }

    }

    /// <summary>
    /// Provides support for generating an <b>"incremental" societal costs</b> modeling report.
    /// </summary>
    [Serializable]
    public class SocietalCostsIncrementalReport : SocietalCostsReport
    {
        /// <inheritdoc/>
        public SocietalCostsIncrementalReport(string path, bool append = false)
            : base(path, append) { }

        /// <inheritdoc/>
        public override ReportDataGenerator GetDataGenerator(
            Scenario scen, ReportingData data, ModelingSettings settings)
        {
            return base.GetDataGenerator(scen, data, settings).AsIncremental();
        }

    }
}
