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

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

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

        private static new string[] GetHeaders()
        {
            string partialHeader = "Trn Code,Trn Version,Trn Type";

            return ReportUtils.GetComponentReportHeaders(partialHeader);
        }

    }
}
