"""
Auth Frontend Views - Login page
"""
from fastapi import APIRouter, Request
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates

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


@router.get("/login", response_class=HTMLResponse)
async def login_page(request: Request):
    """
    Render login page
    """
    return templates.TemplateResponse(
        "auth/frontend/login.html",
        {
            "request": request,
            "hide_top_nav": True,
            "hide_bottom_bar": True,
        }
    )


@router.get("/2fa/setup", response_class=HTMLResponse)
async def two_factor_setup_page(request: Request):
    """
    Render 2FA setup page
    """
    return templates.TemplateResponse(
        "auth/frontend/2fa_setup.html",
        {
            "request": request,
            "hide_top_nav": True,
            "hide_bottom_bar": True,
        }
    )
