using CsvHelper.Configuration;
using System;

namespace HorseRacingPredictor.Horses
{
    public sealed class Punters : ClassMap<HorseRaceData>
    {
        public Punters()
        {
            // Mappatura informazioni principali sul cavallo
            Map(m => m.Num).Name("Num", "#Num", "Number");
            Map(m => m.HorseName).Name("Horse Name", "HorseName", "Name");
            Map(m => m.Age).Name("Age");
            Map(m => m.Gender).Name("Gender");
            Map(m => m.HandicapRating).Name("Handicap Rating");

            // Statistiche di carriera
            Map(m => m.CareerRuns).Name("Career Runs");
            Map(m => m.CareerWins).Name("Career Wins");
            Map(m => m.CareerStrikeRate).Name("Career Strike Rate");
            Map(m => m.CareerROI).Name("Career ROI");
            Map(m => m.CareerPlacings).Name("Career Placings");
            Map(m => m.CareerPlaceStrikeRate).Name("Career Place Strike Rate");

            // Statistiche su pista secca
            Map(m => m.DryTrackRuns).Name("Dry Track Runs");
            Map(m => m.DryTrackWins).Name("Dry Track Wins");
            Map(m => m.DryTrackStrikeRate).Name("Dry Track Strike Rate");
            Map(m => m.DryTrackROI).Name("Dry Track ROI");

            // Statistiche su pista bagnata
            Map(m => m.WetTrackRuns).Name("Wet Track Runs");
            Map(m => m.WetTrackWins).Name("Wet Track Wins");
            Map(m => m.WetTrackStrikeRate).Name("Wet Track Strike Rate");
            Map(m => m.WetTrackROI).Name("Wet Track ROI");

            // Statistiche sui premi
            Map(m => m.AveragePrizeMoney).Name("Average Prize Money");
            Map(m => m.CareerPrizeMoney).Name("Career Prize Money");

            // Quote e pesi
            Map(m => m.BestFixedOdds).Name("Best Fixed Odds");
            Map(m => m.BetEasyOdds).Name("BetEasy Odds");
            Map(m => m.Weight).Name("Weight");
            Map(m => m.WeightCarried).Name("Weight Carried");
            Map(m => m.Barrier).Name("Barrier");
            Map(m => m.PrizeMoney).Name("Prize Money");

            // Statistiche sulla pista attuale
            Map(m => m.ThisTrackRuns).Name("This Track Runs");
            Map(m => m.ThisTrackWins).Name("This Track Wins");
            Map(m => m.ThisTrackStrikeRate).Name("This Track Strike Rate");
            Map(m => m.ThisTrackROI).Name("This Track ROI");
            Map(m => m.ThisTrackPlaces).Name("This Track Places");
            Map(m => m.ThisTrackPlaceStrikeRate).Name("This Track Place Strike Rate");

            // Statistiche sulla distanza
            Map(m => m.ThisDistanceRuns).Name("This Distance Runs");
            Map(m => m.ThisDistanceWins).Name("This Distance Wins");
            Map(m => m.ThisDistanceStrikeRate).Name("This Distance Strike Rate");
            Map(m => m.ThisDistanceROI).Name("This Distance ROI");
            Map(m => m.ThisDistancePlaces).Name("This Distance Places");
            Map(m => m.ThisDistancePlaceStrikeRate).Name("This Distance Place Strike Rate");

            // Statistiche sulla combinazione pista-distanza
            Map(m => m.ThisTrackDistanceRuns).Name("This Track Distance Runs");
            Map(m => m.ThisTrackDistanceWins).Name("This Track Distance Wins");
            Map(m => m.ThisTrackDistanceStrikeRate).Name("This Track Distance Strike Rate");
            Map(m => m.ThisTrackDistanceROI).Name("This Track Distance ROI");
            Map(m => m.ThisTrackDistancePlaces).Name("This Track Distance Places");
            Map(m => m.ThisTrackDistancePlaceStrikeRate).Name("This Track Distance Place Strike Rate");

            // Statistiche sulle condizioni
            Map(m => m.ThisConditionRuns).Name("This Condition Runs");
            Map(m => m.ThisConditionWins).Name("This Condition Wins");
            Map(m => m.ThisConditionStrikeRate).Name("This Condition Strike Rate");
            Map(m => m.ThisConditionROI).Name("This Condition ROI");
            Map(m => m.ThisConditionPlaces).Name("This Condition Places");
            Map(m => m.ThisConditionPlaceStrikeRate).Name("This Condition Place Strike Rate");

            // Fantino
            Map(m => m.Jockey).Name("Jockey");
            Map(m => m.Apprentice).Name("Apprentice");
            Map(m => m.JockeyWeightClaim).Name("Jockey Weight Claim");

            // Statistiche fantino - ultimi 100
            Map(m => m.JockeyLast100HorseEarnings).Name("Jockey Last 100 Horse Earnings");
            Map(m => m.JockeyLast100AvgHorseEarnings).Name("Jockey Last 100 Avg Horse Earnings");
            Map(m => m.JockeyLast100Starts).Name("Jockey Last 100 Starts");
            Map(m => m.JockeyLast100Wins).Name("Jockey Last 100 Wins");
            Map(m => m.JockeyLast100StrikeRate).Name("Jockey Last 100 Strike Rate");
            Map(m => m.JockeyLast100ROI).Name("Jockey Last 100 ROI");
            Map(m => m.JockeyLast100Places).Name("Jockey Last 100 Places");
            Map(m => m.JockeyLast100PlaceStrikeRate).Name("Jockey Last 100 Place Strike Rate");

            // Statistiche fantino - ultimi 12 mesi
            Map(m => m.Jockey12MonthHorseEarnings).Name("Jockey 12 Month Horse Earnings");
            Map(m => m.Jockey12MonthAvgHorseEarnings).Name("Jockey 12 Month Avg Horse Earnings");
            Map(m => m.Jockey12MonthsStarts).Name("Jockey 12 Months Starts");
            Map(m => m.Jockey12MonthsWins).Name("Jockey 12 Months Wins");
            Map(m => m.Jockey12MonthsStrikeRate).Name("Jockey 12 Months Strike Rate");
            Map(m => m.Jockey12MonthsROI).Name("Jockey 12 Months ROI");
            Map(m => m.Jockey12MonthsPlaces).Name("Jockey 12 Months Places");
            Map(m => m.Jockey12MonthsPlaceStrikeRate).Name("Jockey 12 Months Place Strike Rate");

            // Statistiche fantino - stagione corrente
            Map(m => m.JockeyThisSeasonHorseEarnings).Name("Jockey This Season Horse Earnings");
            Map(m => m.JockeyThisSeasonAvgHorseEarnings).Name("Jockey This Season Avg Horse Earnings");
            Map(m => m.JockeyThisSeasonStarts).Name("Jockey This Season Starts");
            Map(m => m.JockeyThisSeasonWins).Name("Jockey This Season Wins");
            Map(m => m.JockeyThisSeasonStrikeRate).Name("Jockey This Season Strike Rate");
            Map(m => m.JockeyThisSeasonROI).Name("Jockey This Season ROI");
            Map(m => m.JockeyThisSeasonPlaces).Name("Jockey This Season Places");
            Map(m => m.JockeyThisSeasonPlaceStrikeRate).Name("Jockey This Season Place Strike Rate");

            // Statistiche fantino - stagione precedente
            Map(m => m.JockeyLastSeasonHorseEarnings).Name("Jockey Last Season Horse Earnings");
            Map(m => m.JockeyLastSeasonAvgHorseEarnings).Name("Jockey Last Season Avg Horse Earnings");
            Map(m => m.JockeyLastSeasonStarts).Name("Jockey Last Season Starts");
            Map(m => m.JockeyLastSeasonWins).Name("Jockey Last Season Wins");
            Map(m => m.JockeyLastSeasonStrikeRate).Name("Jockey Last Season Strike Rate");
            Map(m => m.JockeyLastSeasonROI).Name("Jockey Last Season ROI");
            Map(m => m.JockeyLastSeasonPlaces).Name("Jockey Last Season Places");
            Map(m => m.JockeyLastSeasonPlaceStrikeRate).Name("Jockey Last Season Place Strike Rate");

            // Allenatore
            Map(m => m.Trainer).Name("Trainer");

            // Statistiche allenatore - ultimi 100
            Map(m => m.TrainerLast100HorseEarnings).Name("Trainer Last 100 Horse Earnings");
            Map(m => m.TrainerLast100AvgHorseEarnings).Name("Trainer Last 100 Avg Horse Earnings");
            Map(m => m.TrainerLast100Starts).Name("Trainer Last 100 Starts");
            Map(m => m.TrainerLast100Wins).Name("Trainer Last 100 Wins");
            Map(m => m.TrainerLast100StrikeRate).Name("Trainer Last 100 Strike Rate");
            Map(m => m.TrainerLast100ROI).Name("Trainer Last 100 ROI");
            Map(m => m.TrainerLast100Places).Name("Trainer Last 100 Places");
            Map(m => m.TrainerLast100PlaceStrikeRate).Name("Trainer Last 100 Place Strike Rate");

            // Statistiche allenatore - ultimi 12 mesi
            Map(m => m.Trainer12MonthHorseEarnings).Name("Trainer 12 Month Horse Earnings");
            Map(m => m.Trainer12MonthAvgHorseEarnings).Name("Trainer 12 Month Avg Horse Earnings");
            Map(m => m.Trainer12MonthsStarts).Name("Trainer 12 Months Starts");
            Map(m => m.Trainer12MonthsWins).Name("Trainer 12 Months Wins");
            Map(m => m.Trainer12MonthsStrikeRate).Name("Trainer 12 Months Strike Rate");
            Map(m => m.Trainer12MonthsROI).Name("Trainer 12 Months ROI");
            Map(m => m.Trainer12MonthsPlaces).Name("Trainer 12 Months Places");
            Map(m => m.Trainer12MonthsPlaceStrikeRate).Name("Trainer 12 Months Place Strike Rate");

            // Statistiche allenatore - stagione corrente
            Map(m => m.TrainerThisSeasonHorseEarnings).Name("Trainer This Season Horse Earnings");
            Map(m => m.TrainerThisSeasonAvgHorseEarnings).Name("Trainer This Season Avg Horse Earnings");
            Map(m => m.TrainerThisSeasonStarts).Name("Trainer This Season Starts");
            Map(m => m.TrainerThisSeasonWins).Name("Trainer This Season Wins");
            Map(m => m.TrainerThisSeasonStrikeRate).Name("Trainer This Season Strike Rate");
            Map(m => m.TrainerThisSeasonROI).Name("Trainer This Season ROI");
            Map(m => m.TrainerThisSeasonPlaces).Name("Trainer This Season Places");
            Map(m => m.TrainerThisSeasonPlaceStrikeRate).Name("Trainer This Season Place Strike Rate");

            // Statistiche allenatore - stagione precedente
            Map(m => m.TrainerLastSeasonHorseEarnings).Name("Trainer Last Season Horse Earnings");
            Map(m => m.TrainerLastSeasonAvgHorseEarnings).Name("Trainer Last Season Avg Horse Earnings");
            Map(m => m.TrainerLastSeasonStarts).Name("Trainer Last Season Starts");
            Map(m => m.TrainerLastSeasonWins).Name("Trainer Last Season Wins");
            Map(m => m.TrainerLastSeasonStrikeRate).Name("Trainer Last Season Strike Rate");
            Map(m => m.TrainerLastSeasonROI).Name("Trainer Last Season ROI");
            Map(m => m.TrainerLastSeasonPlaces).Name("Trainer Last Season Places");
            Map(m => m.TrainerLastSeasonPlaceStrikeRate).Name("Trainer Last Season Place Strike Rate");

            // Informazioni ultima corsa
            Map(m => m.LastStartFinishPosition).Name("Last Start Finish Position");
            Map(m => m.LastStartMargin).Name("Last Start Margin");
            Map(m => m.LastStartDistance).Name("Last Start Distance");
            Map(m => m.LastStartDistanceChange).Name("Last Start Distance Change");
            Map(m => m.LastStartPrizeMoney).Name("Last Start Prize Money");

            // URL e link
            Map(m => m.FormGuideUrl).Name("Form Guide Url");
            Map(m => m.HorseProfileUrl).Name("Horse Profile Url");
            Map(m => m.JockeyProfileUrl).Name("Jockey Profile Url");
            Map(m => m.TrainerProfileUrl).Name("Trainer Profile Url");

            // Risultato finale
            Map(m => m.FinishResult).Name("Finish Result (Updates after race)", "Finish Result (Updates");
        }
    }
}
