"""
Classroom API - Modularer Router.

Dieser Router sammelt alle Classroom-bezogenen Endpoints aus den Submodulen.
Für Rückwärtskompatibilität kann der alte classroom_api.py Pfad weiterhin
verwendet werden.

Struktur:
- sessions.py: Session CRUD, Timer, Phasen, History
- templates.py: Stunden-Vorlagen
- homework.py: Hausaufgaben-Tracking
- materials.py: Unterrichtsmaterialien
- analytics.py: Analytics & Reflexionen
- feedback.py: Lehrer-Feedback
- settings.py: Lehrer-Einstellungen
- utility.py: Health, Phases, Export
- context.py: Teacher Context (v1 API)
"""

from fastapi import APIRouter

from .sessions import router as sessions_router
from .templates import router as templates_router
from .homework import router as homework_router
from .materials import router as materials_router
from .analytics import router as analytics_router
from .feedback import router as feedback_router
from .settings import router as settings_router
from .utility import router as utility_router
from .context import router as context_router

# Haupt-Router mit Prefix
router = APIRouter(prefix="/api/classroom", tags=["Classroom"])

# Sub-Router einbinden
router.include_router(sessions_router)
router.include_router(templates_router)
router.include_router(homework_router)
router.include_router(materials_router)
router.include_router(analytics_router)
router.include_router(feedback_router)
router.include_router(settings_router)
router.include_router(utility_router)
router.include_router(context_router)

# Re-exports für einfachen Import
from .models import (
    CreateSessionRequest,
    SessionResponse,
    TimerStatus,
    SuggestionsResponse,
)
from .shared import (
    ws_manager,
    get_session_or_404,
    start_timer_broadcast,
    stop_timer_broadcast,
)

__all__ = [
    "router",
    "ws_manager",
    "get_session_or_404",
    "start_timer_broadcast",
    "stop_timer_broadcast",
    "CreateSessionRequest",
    "SessionResponse",
    "TimerStatus",
    "SuggestionsResponse",
]
