"""
Webshop Module - Views Router
HTML page serving for webshop admin interface
"""

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

# Router for HTML views
router = APIRouter()

# Template directory - must be root "app" to allow extending shared/frontend/base.html
templates = Jinja2Templates(directory="app")


@router.get("/webshop", response_class=HTMLResponse, include_in_schema=False)
async def webshop_admin(request: Request):
    """
    Webshop administration interface
    """
    return templates.TemplateResponse("modules/webshop/frontend/index.html", {"request": request})
