"""NBA combined league model."""

import requests

from ...combined.combined_league_model import CombinedLeagueModel
from ...league import League
from ..espn.nba_espn_league_model import NBAESPNLeagueModel
from ..nba.nba_nba_league_model import NBANBALeagueModel

ORLANDO_MAGIC = "1610612753"
ATLANTA_HAWKS = "1610612737"
PORTLAND_TRAIL_BLAZERS = "1610612757"
DENVER_NUGGETS = "1610612743"
MIAMI_HEAT = "1610612748"
LOS_ANGELES_LAKERS = "1610612747"
BOSTON_CELTICS = "1610612738"
OKLAHOMA_CITY_THUNDER = "1610612760"
SACRAMENTO_KINGS = "1610612758"
INDIANA_PACERS = "1610612754"
SAN_ANTONIO_SPURS = "1610612759"
PHOENIX_SUNS = "1610612756"
WASHINGTON_WIZARDS = "1610612764"
PHILADELPHIA_76ERS = "1610612755"
TORONTO_RAPTORS = "1610612761"
GOLDEN_STATE_WARRIORS = "1610612744"
MINNESOTA_TIMBERWOLVES = "1610612750"
HOUSTON_ROCKETS = "1610612745"
MEMPHIS_GRIZZLIES = "1610612763"
NEW_YORK_KNICKS = "1610612752"
CHARLOTTE_HORNETS = "1610612766"
BROOKLYN_NETS = "1610612751"
DALLAS_MAVERICKS = "1610612742"
CLEVELAND_CAVALIERS = "1610612739"
MILWAUKEE_BUCKS = "1610612749"
DETROIT_PISTONS = "1610612765"
NEW_ORLEANS_PELICANS = "1610612740"
CHICAGO_BULLS = "1610612741"
LA_CLIPPERS = "1610612746"
UTAH_JAZZ = "1610612762"
UNKNOWN = "1610616842"
TEAM_JALEN = "1610616849"
TEAM_TAMIKA = "1610616850"
TEAM_PAU = "1610616847"
TEAM_DETLEF = "1610616848"
TEAM_STEPHEN_A = "1610616840"
EAST_NBA_ALL_STARS = "1610616833"
WEST_NBA_ALL_STARS = "1610616834"
TEAM_SHANNON = "1610616839"
NEW_ZEALAND_BREAKERS = "15020"
RATIOPHARM_ULM = "15025"
CAIRNS_TAIPANS = "15022"
RAANANA_MACCABI = "50009"
FLAMENGO = "12325"
MADRID_BALONCESTO = "12315"
ADELAIDE_36ERS = "15019"
TEAM_USA = "1610616843"
SHANGHAI_SHARKS = "12329"
SESI_FRANCA_BASKETBALL_CLUB_OF_BRAZIL = "12332"
HAIFA_MACABI = "93"
BUENOS_AIRES_SAN_LORENZO = "12330"
GUANGZHOU_LONG_LIONS = "15018"
MELBOURNE_UNITED = "15016"
WORLD = "1610616844"
BEIJING_DUCKS = "15021"
PERTH_WILDCATS = "104"
SYDNEY_KINGS = "15015"
BRISBANE_BULLETS = "15017"
BARCELONA_LASSA = "12304"
ISTANBUL_FENERBAHCE_SPORTS_CLUB = "12321"
MILANO_OLIMPIA = "94"
BAURU_PASCHOALOTTO = "12328"
TEL_AVIV_MACCABI_ELECTRA = "41"
BERLIN_ALBA = "12323"
BILBAO_BASKET = "12324"
MOSCOW_CSKA = "12308"
SIENA_MONTEPASCI = "12322"
SOPHOMORES = "1610616838"
ROOKIES = "1610616837"
VITORIA_CAJAL_LABORAL = "95"
BELGRADE_PARTIZAN = "12319"
ATHENS_OLYMPIACOS = "12320"
HORNETS = "1610612778"
VILNIUS_LIETUVOS_RYTAS = "12314"
ISTANBUL_EFES_PILSEN = "12309"
LOTTOMATICA_ROMA = "12317"
UNICAJA_MALAGA = "12311"
MMT_ESTUDIANTES = "12318"
PANATHINAIKOS = "12313"
ZALGIRIS_KAUNAS = "12316"
TEAM_CHINA = "45"
CLUTCH_CITY = "1610612767"
H_TOWN = "1610612778"
LYON_VILLEURBANNE_ADECCO_ASVEL = "12305"
KHIMKI_BC = "12306"
TEL_AVIV_MACCABI_ELITE = "12303"
NBA_TEAM_IDENTITY_MAP = {
    "1610612753": ORLANDO_MAGIC,
    "1610612737": ATLANTA_HAWKS,
    "1610612757": PORTLAND_TRAIL_BLAZERS,
    "1610612743": DENVER_NUGGETS,
    "1610612748": MIAMI_HEAT,
    "1610612747": LOS_ANGELES_LAKERS,
    "1610612738": BOSTON_CELTICS,
    "1610612760": OKLAHOMA_CITY_THUNDER,
    "1610612758": SACRAMENTO_KINGS,
    "1610612754": INDIANA_PACERS,
    "1610612759": SAN_ANTONIO_SPURS,
    "1610612756": PHOENIX_SUNS,
    "1610612764": WASHINGTON_WIZARDS,
    "1610612755": PHILADELPHIA_76ERS,
    "1610612761": TORONTO_RAPTORS,
    "1610612744": GOLDEN_STATE_WARRIORS,
    "1610612750": MINNESOTA_TIMBERWOLVES,
    "1610612745": HOUSTON_ROCKETS,
    "1610612763": MEMPHIS_GRIZZLIES,
    "1610612752": NEW_YORK_KNICKS,
    "1610612766": CHARLOTTE_HORNETS,
    "1610612751": BROOKLYN_NETS,
    "1610612742": DALLAS_MAVERICKS,
    "1610612739": CLEVELAND_CAVALIERS,
    "1610612749": MILWAUKEE_BUCKS,
    "1610612765": DETROIT_PISTONS,
    "1610612740": NEW_ORLEANS_PELICANS,
    "1610612741": CHICAGO_BULLS,
    "1610612746": LA_CLIPPERS,
    "1610612762": UTAH_JAZZ,
    "1610616842": UNKNOWN,
    "1610616841": UNKNOWN,
    "1610616849": TEAM_JALEN,
    "1610616850": TEAM_TAMIKA,
    "1610616847": TEAM_PAU,
    "1610616848": TEAM_DETLEF,
    "1610616840": TEAM_STEPHEN_A,
    "1610616833": EAST_NBA_ALL_STARS,
    "1610616834": WEST_NBA_ALL_STARS,
    "1610616839": TEAM_SHANNON,
    "15020": NEW_ZEALAND_BREAKERS,
    "15025": RATIOPHARM_ULM,
    "15022": CAIRNS_TAIPANS,
    "50009": RAANANA_MACCABI,
    "12325": FLAMENGO,
    "12315": MADRID_BALONCESTO,
    "15019": ADELAIDE_36ERS,
    "1610616843": TEAM_USA,
    "12329": SHANGHAI_SHARKS,
    "12332": SESI_FRANCA_BASKETBALL_CLUB_OF_BRAZIL,
    "93": HAIFA_MACABI,
    "12330": BUENOS_AIRES_SAN_LORENZO,
    "15018": GUANGZHOU_LONG_LIONS,
    "15016": MELBOURNE_UNITED,
    "1610616844": WORLD,
    "15021": BEIJING_DUCKS,
    "104": PERTH_WILDCATS,
    "15015": SYDNEY_KINGS,
    "15017": BRISBANE_BULLETS,
    "12304": BARCELONA_LASSA,
    "12321": ISTANBUL_FENERBAHCE_SPORTS_CLUB,
    "94": MILANO_OLIMPIA,
    "12328": BAURU_PASCHOALOTTO,
    "41": TEL_AVIV_MACCABI_ELECTRA,
    "12323": BERLIN_ALBA,
    "12324": BILBAO_BASKET,
    "12308": MOSCOW_CSKA,
    "12322": SIENA_MONTEPASCI,
    "1610616838": SOPHOMORES,
    "1610616837": ROOKIES,
    "95": VITORIA_CAJAL_LABORAL,
    "12319": BELGRADE_PARTIZAN,
    "12320": ATHENS_OLYMPIACOS,
    "1610612778": HORNETS,
    "12314": VILNIUS_LIETUVOS_RYTAS,
    "12309": ISTANBUL_EFES_PILSEN,
    "12317": LOTTOMATICA_ROMA,
    "12311": UNICAJA_MALAGA,
    "12318": MMT_ESTUDIANTES,
    "12313": PANATHINAIKOS,
    "12316": ZALGIRIS_KAUNAS,
    "45": TEAM_CHINA,
    "1610612767": CLUTCH_CITY,
    "12305": LYON_VILLEURBANNE_ADECCO_ASVEL,
    "12306": KHIMKI_BC,
    "12303": TEL_AVIV_MACCABI_ELITE,
    "12307": LOTTOMATICA_ROMA,
}
NBA_VENUE_IDENTITY_MAP: dict[str, str] = {}


class NBACombinedLeagueModel(CombinedLeagueModel):
    """NBA combined implementation of the league model."""

    def __init__(self, session: requests.Session) -> None:
        super().__init__(
            session,
            League.NBA,
            [
                NBANBALeagueModel(session),
                NBAESPNLeagueModel(session),
            ],
        )

    @classmethod
    def team_identity_map(cls) -> dict[str, str]:
        return NBA_TEAM_IDENTITY_MAP

    @classmethod
    def venue_identity_map(cls) -> dict[str, str]:
        return NBA_VENUE_IDENTITY_MAP
