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

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

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

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

            return ReportUtils.GetComponentReportHeaders(partialHeader);
        }

    }
}
