from fastapi import Request
from folkugat_web.model import temes as model
from folkugat_web.templates import templates


def score(request: Request, logged_in: bool, score: model.Score):
    return templates.TemplateResponse(
        "fragments/tema/score.html",
        {
            "request": request,
            "logged_in": logged_in,
            "score": score,
        }
    )


# def score_code(request: Request, logged_in: bool, tema: model.Tema):
#     return templates.TemplateResponse(
#         "fragments/tema/score.html",
#         {
#             "request": request,
#             "logged_in": logged_in,
#             "tema": tema,
#         }
#     )


def score_editor(request: Request, logged_in: bool, score: model.Score):
    return templates.TemplateResponse(
        "fragments/tema/editor/score.html",
        {
            "request": request,
            "logged_in": logged_in,
            "score": score,
        }
    )
