from __future__ import annotations

from typing import TYPE_CHECKING

from fastapi import APIRouter

if TYPE_CHECKING:
    from niannian.client import NianNian


def create_health_router(nn: NianNian) -> APIRouter:
    router = APIRouter(tags=["health"])

    @router.get("/health")
    def health():
        return nn.health()

    return router
