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

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

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

        private static new string[] GetHeaders()
        {
            string[] headers = {
                //----- header columns -----
                "Scenario", "Scenario Name", "Model Year",

                //----- vehicle info -----
                "Manufacturer", "Veh Code", "Brand", "Model", "Name Plate",
                "Plt Code", "Platform", "Plt Version",

                //----- powertrain info -----
                "Powertrain", "Veh Power Initial", "Veh Power",
                "Eng Code", "Eng Fuel Initial", "Eng Type Initial", "Eng Version","Eng Fuel", "Eng Type",
                "Trn Code", "Trn Type Initial", "Trn Version", "Trn Type",

                //----- fuel economy/fuel share -----
                "FE Primary Initial", "FE Secondary Initial", "FE Initial", "Fuel Initial", "FS Initial",
                "FE Primary Rated", "FE Secondary Rated", "FE Rated",
                "FE Primary Compliance", "FE Secondary Compliance", "FE Compliance", "Fuel", "Fuel Share",

                //----- CO2 rating -----
                "CO2 Primary Initial", "CO2 Secondary Initial", "CO2 Initial",
                "CO2 Primary Rated", "CO2 Secondary Rated", "CO2 Rated",

                //----- regulatory classification -----
                "Veh Style", "Veh Class", "Reg Class", "Tech Class", "Eng Tech Class", "Safety Class",

                //----- planning info (redesign/refresh) -----
                "Veh Redesign/Refresh", "Plt Redesign/Refresh", "Eng Redesign/Refresh", "Trn Redesign/Refresh",

                //----- vehicle attributes -----
                "CW (MR0)", "GW (MR0)", "CW Initial", "CW", "TW Initial", "TW",
                "GVWR Initial", "GVWR", "GCWR Initial", "GCWR", "Footprint", "Work Factor",

                //----- targets and ZEV -----
                "FE Target", "CO2 Target", "ZEV Credits",

                //----- sales & msrp -----
                "Sales Initial", "Sales", "MSRP Initial", "MSRP", "Labor Hours",

                //----- unit costs -----
                "AC/OC Cost", "Battery Cost", "Non-Battery Cost", "Total Tech Cost",
                "Price Increase", "Maint/Repair Cost", "Tax Credit", "Battery Tax Credit",
                "Delta HEV Cost", "Delta Tax Credit", "Delta Battery Tax Credit", "Delta Consumer WTP", "Tech Burden",
                "Taxes/Fees Initial", "Taxes/Fees", "Financing Initial", "Financing", "Insurance Initial", "Insurance",
                "Payback", "Payback TCO",

                //----- tech utilization-----
                "TechKey Initial", "TechKey"
            };

            return headers;
        }

    }
}
