"""sportly.espn.tennis — ATP and WTA tours."""
from __future__ import annotations

from sportly.client import SportlyClient
from sportly.espn._leagues import LEAGUES as _ALL_LEAGUES
from sportly.espn.endpoints import news as _news_ep
from sportly.espn.endpoints import schedule as _schedule_ep
from sportly.espn.endpoints import standings as _standings_ep
from sportly.models import Article, Game, Standings

SPORT = "tennis"
DEFAULT_LEAGUE = "atp"
LEAGUES: dict[str, str] = _ALL_LEAGUES[SPORT]

def scoreboard(league: str = DEFAULT_LEAGUE, *, date: str | None = None, client: SportlyClient | None = None) -> list[Game]:
    return _schedule_ep.scoreboard(SPORT, league, date=date, client=client)

def game(game_id: str, league: str = DEFAULT_LEAGUE, *, client: SportlyClient | None = None) -> Game:
    return _schedule_ep.game(SPORT, league, game_id, client=client)

def news(league: str = DEFAULT_LEAGUE, *, limit: int = 25, client: SportlyClient | None = None) -> list[Article]:
    return _news_ep.news(SPORT, league, limit=limit, client=client)

def standings(league: str = DEFAULT_LEAGUE, *, client: SportlyClient | None = None) -> Standings:
    return _standings_ep.standings(SPORT, league, client=client)
