from fastapi import APIRouter

from app import __version__
from app.core.config import settings

router = APIRouter()


@router.get("/health")
async def health_check():
    return {
        "status": "ok",
        "service": settings.service_name,
        "version": __version__,
    }


@router.get("/capabilities")
async def capabilities():
    return {
        "service": settings.service_name,
        "version": __version__,
        "phase": "9.7",
        "features": {
            "foundation": True,
            "connector_framework": True,
            "membership_catalog": True,
            "member_management": True,
            "coach_staff_management": True,
            "booking_engine": True,
            "attendance_engine": True,
            "training_management": True,
            "competition_management": True,
            "coaches": True,
            "accounting_integration": False,
            "ai": False,
        },
        "independence": {
            "standalone": True,
            "superapp": True,
            "integrations": ["crm", "loyalty", "accounting", "communication", "ai"],
            "integration_mode": "api_and_events_only",
        },
    }
