import logging
from fastapi import APIRouter
from fastapi.responses import RedirectResponse

from mini_videorag.temporal.api.schemas.system import HealthResponse

logger = logging.getLogger(__name__)

router = APIRouter(tags=["System"])


@router.get("/", include_in_schema=False)
async def root():
    """Redirect to Swagger UI."""
    return RedirectResponse(url="/docs")


@router.get(
    "/health",
    response_model=HealthResponse,
    summary="Health check",
    description="Check if the API service is running.",
)
async def health():
    """Health check endpoint."""
    return HealthResponse(status="healthy")
