"""Legal documentation routes — ToS, Privacy Policy, Risk Disclaimers.

Part of the Whitestone legal foundation for the Lightning payment-adjacent service.
"""

import logging

from fastapi import APIRouter, Request
from fastapi.responses import HTMLResponse

from dashboard.templating import templates

logger = logging.getLogger(__name__)

router = APIRouter(prefix="/legal", tags=["legal"])


@router.get("/tos", response_class=HTMLResponse)
async def terms_of_service(request: Request) -> HTMLResponse:
    """Terms of Service page."""
    return templates.TemplateResponse(request, "legal/tos.html", {})


@router.get("/privacy", response_class=HTMLResponse)
async def privacy_policy(request: Request) -> HTMLResponse:
    """Privacy Policy page."""
    return templates.TemplateResponse(request, "legal/privacy.html", {})


@router.get("/risk", response_class=HTMLResponse)
async def risk_disclaimers(request: Request) -> HTMLResponse:
    """Risk Disclaimers page."""
    return templates.TemplateResponse(request, "legal/risk.html", {})
