# app/modules/monitoring/routes/api/admin.py
"""
Monitoring module admin API routes.

Aggregates all admin monitoring routes:
- /logs/* - Application log management
- /tasks/* - Background tasks monitoring
- /tests/* - Test runner
- /code-quality/* - Code quality tools
- /audit/* - Admin audit logging
- /platform/* - Platform health and capacity
"""

from fastapi import APIRouter, Depends

from app.api.deps import require_module_access
from app.modules.enums import FrontendType

from .admin_audit import admin_audit_router
from .admin_code_quality import admin_code_quality_router
from .admin_logs import admin_logs_router
from .admin_platform_health import admin_platform_health_router
from .admin_tasks import admin_tasks_router
from .admin_tests import admin_tests_router

router = APIRouter(
    dependencies=[Depends(require_module_access("monitoring", FrontendType.ADMIN))],
)

# Aggregate all monitoring admin routes
router.include_router(admin_logs_router, tags=["admin-logs"])
router.include_router(admin_tasks_router, tags=["admin-tasks"])
router.include_router(admin_tests_router, tags=["admin-tests"])
router.include_router(admin_code_quality_router, tags=["admin-code-quality"])
router.include_router(admin_audit_router, tags=["admin-audit"])
router.include_router(admin_platform_health_router, tags=["admin-platform-health"])
