# -*- coding: utf-8 -*-
#%% SERIE_A
# SERIE_A = 'serie_a'
#
# SERIE_A_PATH = ['https://www.football-data.co.uk/mmz4281/1011/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1112/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1213/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1314/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1415/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1516/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1617/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1718/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1819/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/1920/I1.csv',
#                'https://www.football-data.co.uk/mmz4281/2021/I1.csv']
#
# PARMA = 'Parma'
# FIORENTINA = 'Fiorentina'
# UDINESE = 'Udinese'
# CAGLIARI = 'Cagliari'
# ROMA = 'Roma'
# SAMPDORIA = 'Sampdoria'
# SPAL = 'Spal'
# TORINO = 'Torino'
# VERONA = 'Verona'
# INTER = 'Inter'
# BOLOGNA = 'Bologna'
# MILAN = 'Milan'
# JUVENTUS = 'Juventus'
# LAZIO = 'Lazio'
# ATALANTA = 'Atalanta'
# GENOA = 'Genoa'
# LECCE = 'Lecce'
# SASSUOLO = 'Sassuolo'
# NAPOLI = 'Napoli'
# BRESCIA = 'Brescia'
# SPEZIA = 'Spezia'
# BENEVENTO = 'Benevento'
# CROTONE = 'Crotone'
#
# SERIE_A_TEAMS = [PARMA, FIORENTINA, UDINESE, CAGLIARI, ROMA, SAMPDORIA,
#                  TORINO, VERONA, INTER, BOLOGNA, MILAN, JUVENTUS,
#                  LAZIO, ATALANTA, GENOA, SASSUOLO, NAPOLI,
#                  SPEZIA, BENEVENTO, CROTONE]
# #%% PREMIER
# PREMIER = 'premier_league'
#
# PREMIER_PATH = ['https://www.football-data.co.uk/mmz4281/1011/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1112/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1213/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1314/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1415/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1516/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1617/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1718/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1819/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/1920/E0.csv',
#                'https://www.football-data.co.uk/mmz4281/2021/E0.csv']
#
# LIVERPOOL = 'Liverpool'
# WEST_HAM = 'West Ham'
# BOURNEMOUTH = 'Bournemouth'
# BURNLEY = 'Burnley'
# CRYSTAL_PALACE = 'Crystal Palace'
# WATFORD = 'Watford'
# TOTTENHAM = 'Tottenham'
# LEICESTER = 'Leicester'
# NEWCASTLE = 'Newcastle'
# MAN_UNITED = 'Man United'
# ARSENAL = 'Arsenal'
# ASTON_VILLA = 'Aston Villa'
# BRIGHTON = 'Brighton'
# EVERTON = 'Everton'
# NORWICH = 'Norwich'
# SOUTHAMPTON = 'Southampton'
# MAN_CITY = 'Man City'
# SHEFFIELD_UNITED = 'Sheffield United'
# CHELSEA = 'Chelsea'
# WOLVES = 'Wolves'
# WEST_BROM = 'West Brom'
# FULHAM = 'Fulham'
# LEEDS = 'Leeds'
#
# PREMIER_TEAMS = [LIVERPOOL, WEST_HAM, BURNLEY, CRYSTAL_PALACE, LEEDS, WEST_BROM,
#                  TOTTENHAM, LEICESTER, NEWCASTLE, MAN_UNITED,
#                  ARSENAL, ASTON_VILLA, BRIGHTON, EVERTON, SOUTHAMPTON,
#                  MAN_CITY, SHEFFIELD_UNITED, CHELSEA, WOLVES, FULHAM]
#
# #%%
# PREMIER_2 = 'premier_2'
#
# PREMIER_2_PATH = ['https://www.football-data.co.uk/mmz4281/1011/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1112/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1213/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1314/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1415/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1516/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1617/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1819/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/1920/E1.csv',
#                 'https://www.football-data.co.uk/mmz4281/2021/E1.csv']
#
# LUTON = 'Luton'
# BARNSLEY = 'Barnsley'
# BLACKBURN = 'Blackburn'
# BRENTFORD = 'Brentford'
# MILLWALL = 'Millwall'
# READING = 'Reading'
# STOKE = 'Stoke'
# SWANSEA = 'Swansea'
# WIGAN = 'Wigan'
# NOTTINGAM_FOREST = 'Nott\'m Forest'
# BRISTOL_CITY = 'Bristol City'
# HUDDERSFIELD = 'Huddersfield'
# LEEDS = 'Leeds'
# BIRMINGHAM = 'Birmingham'
# CARDIFF = 'Cardiff'
# CHARLTON = 'Charlton'
# DERBY = 'Derby'
# FULHAM = 'Fulham'
# HULL = 'Hull'
# MIDDLESBROUGH = 'Middlesbrough'
# PRESTON = 'Preston'
# QPR = 'QPR'
# SHEFFIELD_WEDS = 'Sheffield Weds'
# WEST_BROM = 'West Brom'
#
# PREMIER_2_TEAMS = [LUTON, BARNSLEY, BLACKBURN, BRENTFORD, MILLWALL, READING, STOKE, SWANSEA, WIGAN, NOTTINGAM_FOREST, BRISTOL_CITY,
#                    HUDDERSFIELD, LEEDS, BIRMINGHAM, CARDIFF, CHARLTON, DERBY, FULHAM, HULL, MIDDLESBROUGH, PRESTON, QPR, SHEFFIELD_WEDS,
#                    WEST_BROM]
#
# #%%
#
# JUPILIER = 'jupilier'
#
# JUPILIER_PATH = ['https://www.football-data.co.uk/mmz4281/1011/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1112/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1213/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1314/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1415/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1516/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1617/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1718/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1819/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/1920/B1.csv',
#                  'https://www.football-data.co.uk/mmz4281/2021/B1.csv']
#
# GENK = 'Genk'
# CERCLE_BRUGGE = 'Cercle Brugge'
# ST_TRUIDEN = 'St Truiden'
# WAREGEM = 'Waregem'
# WAASLAND_BEVEREN = 'Waasland-Beveren'
# ANDERLECHT = 'Anderlecht'
# CHARLEROI = 'Charleroi'
# EUPEN = 'Eupen'
# CLUB_BRUGGE = 'Club Brugge'
# ST_LIEGI = 'St Liegi'
# KORTRIJK = 'Kortrijk'
# OOSTENDE = 'Oostende'
# MECHELEN = 'Mechelen'
# GENT = 'Gent'
# MOUSCRON = 'Mouscron'
# ANTWERP = 'Antwerp'
# BEERSCHOT = 'Beerschot'
# LEUVEN = 'Leuven'
#
# JUPILIER_TEAMS = [BEERSCHOT, GENK, LEUVEN, CERCLE_BRUGGE, ST_TRUIDEN, WAREGEM, WAASLAND_BEVEREN,
#                   ANDERLECHT, CHARLEROI, EUPEN, CLUB_BRUGGE, ST_LIEGI,
#                   KORTRIJK, OOSTENDE, MECHELEN, GENT, MOUSCRON, ANTWERP]
#
# #%%
# LEAGUE_NAMES = [SERIE_A,
#                 PREMIER,
# #                PREMIER_2,
# #                 JUPILIER,
#
#                 ]
#
# TEAMS_LEAGUE = {SERIE_A : SERIE_A_TEAMS,
#                 PREMIER : PREMIER_TEAMS,
#                 JUPILIER: JUPILIER_TEAMS,
#                 }
#
# N_TEAMS = {SERIE_A : 20,
#            PREMIER : 20,
#            JUPILIER: 18}
#
# DATA_DIR = 'resources/leagues_data/'
# MODEL_DIR = 'resources/models/'
# SERIE_A_MODEL_NAME = '2020-12-05_16:43:00.796603-serie_a-model_v1.0'
# PREMIER_MODEL_NAME = '2020-10-29_10:34:18.765085-premier_league-round=7_v1.0'
# JUPILIER_MODEL_NAME = ''
#
# LEAGUE_DIR = {SERIE_A:f'{DATA_DIR}{SERIE_A}'}
#
# MODEL_PATH = {SERIE_A: f'{MODEL_DIR}{SERIE_A}/{SERIE_A_MODEL_NAME}/{SERIE_A_MODEL_NAME}.pth',
#               PREMIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/{PREMIER_MODEL_NAME}.pth',
#               JUPILIER: f'{MODEL_DIR}{JUPILIER_MODEL_NAME}/{JUPILIER_MODEL_NAME}.pth'}
#
# LEAGUE_PARAMS = {SERIE_A: f'{MODEL_DIR}{SERIE_A}/{SERIE_A_MODEL_NAME}/1.league_params.json',
#                  PREMIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/1.league_params.json',
#                  JUPILIER: f'{MODEL_DIR}{JUPILIER_MODEL_NAME}/1.league_params.json'}
#
# DATA_PARAMS = {SERIE_A: f'{MODEL_DIR}{SERIE_A}/{SERIE_A_MODEL_NAME}/2.data_params.json',
#                PREMIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/2.data_params.json',
#                JUPILIER: f'{MODEL_DIR}{JUPILIER_MODEL_NAME}/2.data_params.json'}
#
# MODEL_PARAMS = {SERIE_A: f'{MODEL_DIR}{SERIE_A}/{SERIE_A_MODEL_NAME}/3.model_params.json',
#                PREMIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/2.data_params.json',
#                JUPILIER: f'{MODEL_DIR}{JUPILIER_MODEL_NAME}/2.data_params.json'}
#
# FEAT_ENG = {SERIE_A: f'{MODEL_DIR}{SERIE_A}/{SERIE_A_MODEL_NAME}/feat_eng',
#             PREMIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/feat_eng_object',
#             JUPILIER: f'{MODEL_DIR}{PREMIER_MODEL_NAME}/feat_eng_object'}
#%%
from scripts.constants.league import SERIE_A, SERIE_A_PATH, PREMIER, PREMIER_PATH, JUPILIER, JUPILIER_PATH, LIGUE_1, \
    LIGUE_1_PATH, LEAGUE_NAMES, EREDIVISIE, EREDIVISIE_PATH, LIGA, LIGA_PATH, LIGA_2, LIGA_2_PATH


@DeprecationWarning
def load_model_paths(league_name, model_version, model_name):
    league_name = league_name.lower()
    league = league_name if league_name in LEAGUE_NAMES else None
    model_version = 'network_v1' if model_version==1 else 'network_v2' if model_version==2 else None

    # if league is not None and model_version is not None:
    #     folder_dir = f'{MODEL_DIR}{model_version}/{league}/{model_name}/'
    #     model_path = f'{folder_dir}{model_name}.pth'
    #     league_params_path = f'{folder_dir}1.league_params.json'
    #     data_params_path = f'{folder_dir}2.data_params.json'
    #     model_params_path = f'{folder_dir}3.model_params.json'
    #     feat_eng_path = f'{folder_dir}feat_eng'
    #
    #     paths = {'model': model_path,
    #              'model_params':model_params_path,
    #              'league_params':league_params_path,
    #              'data_params':data_params_path,
    #              'feat_eng':feat_eng_path}
    #
    #     return paths
    #
    # else:
    #     raise ValueError('LOAD MDOEL PATHS: Wrong League Name provided')

def get_league_csv_paths(league_name):
    
    if(league_name == SERIE_A):
        paths = SERIE_A_PATH
    
    elif(league_name == PREMIER):
        paths = PREMIER_PATH
        
    elif(league_name == JUPILIER):
        paths = JUPILIER_PATH

    elif (league_name == LIGUE_1):
        paths = LIGUE_1_PATH

    elif (league_name == EREDIVISIE):
        paths = EREDIVISIE_PATH

    elif (league_name == LIGA):
        paths = LIGA_PATH

    elif (league_name == LIGA_2):
        paths = LIGA_2_PATH
        
    return paths