"""Routes API v1 de l'application."""

from fastapi import APIRouter

from .predictions import router as predictions_router
from .users import router as users_router
from .backtesting import router as backtesting_router
from .user_predictions import router as user_predictions_router
from .badges import router as badges_router
from .leaderboard import router as leaderboard_router
# #region agent log
def write_debug_log(hypothesisId: str, location: str, message: str, data: dict = None):
    """Écrit un log NDJSON pour le debug."""
    import json
    from datetime import datetime
    log_entry = {
        "sessionId": "debug-session",
        "runId": "run1",
        "hypothesisId": hypothesisId,
        "location": location,
        "message": message,
        "data": data or {},
        "timestamp": datetime.now().timestamp() * 1000
    }
    with open(r"d:\\dev_new_pc\\chartbastan\\.cursor\\debug.log", "a") as f:
        f.write(json.dumps(log_entry) + "\n")
write_debug_log("C", "__init__.py:20", "API v1 routers initialized without main v1 router", {"routers": ["users", "auth", "predictions", "backtesting", "leaderboard", "badges", "user_predictions"]})
# #endregion

__all__ = ["predictions_router", "users_router", "backtesting_router", "user_predictions_router", "badges_router", "leaderboard_router", "auth_router"]