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

router = APIRouter()
templates = Jinja2Templates(directory="app")


@router.get("/anydesk/sessions", response_class=HTMLResponse, tags=["Frontend"])
async def anydesk_sessions_page(request: Request):
    return templates.TemplateResponse(
        "anydesk/frontend/sessions.html",
        {"request": request, "page_title": "AnyDesk Sessions"},
    )
