from __future__ import annotations

from fastapi import APIRouter, Depends
from app.core.dependencies import enforce_admin_access

from app.api import (
    admin_auth,
    admin_content_generation,
    admin_agent_records,
    admin_dashboard,
    admin_entitlements,
    admin_knowledge,
    admin_knowledge_lifecycle,
    admin_management,
    admin_records,
    admin_settings,
    admin_sso,
    admin_users,
    auth,
    feedback,
    chat,
    health,
    integration_sso,
    user,
    voice,
)

api_router = APIRouter()
api_router.include_router(health.router, tags=["health"])
api_router.include_router(auth.router, prefix="/auth", tags=["auth"])
api_router.include_router(integration_sso.router, prefix="/integration/sso", tags=["integration-sso"])
api_router.include_router(user.router, prefix="/user", tags=["user"])
api_router.include_router(voice.router, prefix="/voice", tags=["voice"])
api_router.include_router(chat.router, prefix="/chat", tags=["chat"])
api_router.include_router(feedback.router, prefix="/feedback", tags=["feedback"])
api_router.include_router(admin_auth.router, prefix="/admin", tags=["admin"])
api_router.include_router(admin_management.router, prefix="/admin", tags=["admin-management"])
guard = [Depends(enforce_admin_access)]
api_router.include_router(admin_content_generation.router, prefix="/admin", tags=["admin-content-generation"], dependencies=guard)
api_router.include_router(admin_agent_records.router, prefix="/admin", tags=["admin-agent-records"], dependencies=guard)
api_router.include_router(admin_dashboard.router, prefix="/admin", tags=["admin"], dependencies=guard)
api_router.include_router(admin_entitlements.router, prefix="/admin", tags=["admin-entitlements"], dependencies=guard)
api_router.include_router(admin_users.router, prefix="/admin", tags=["admin"], dependencies=guard)
api_router.include_router(admin_knowledge.router, prefix="/admin", tags=["admin"], dependencies=guard)
api_router.include_router(admin_knowledge_lifecycle.router, prefix="/admin", tags=["admin-knowledge-lifecycle"], dependencies=guard)
api_router.include_router(admin_settings.router, prefix="/admin", tags=["admin"], dependencies=guard)
api_router.include_router(admin_sso.router, prefix="/admin", tags=["admin-sso"], dependencies=guard)
api_router.include_router(admin_records.router, prefix="/admin", tags=["admin"], dependencies=guard)
