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

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

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

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

            return ReportUtils.GetComponentReportHeaders(partialHeader);
        }

    }
}
