from fastapi import APIRouter

from app.core.config import get_settings


router = APIRouter()


@router.get("/status")
def ordini_status() -> dict[str, object]:
    settings = get_settings()
    return {
        "mode": "native-module",
        "status": "active",
        "public_url": settings.ordini_frontend_public_url,
        "api_url": settings.ordini_backend_public_url,
        "managed_by": "ordini service",
        "notes": [
            "Catalogo prodotti, ordini sospesi, storico e note sono persistiti su SQL.",
            "Il frontend e' servito da Nginx e parla col backend FastAPI tramite proxy locale.",
        ],
    }
