@using Memodex.WebApp.Infrastructure
@inject ProfileProvider ProfileProvider

@{
    CurrentProfile profile = await ProfileProvider.GetSelectedProfileAsync();
}

<!DOCTYPE html>
<html lang="en" class="h-full @(profile.PreferredTheme)">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Memodex</title>
    <link rel="icon" href="~/favicon.ico"/>
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
    <script src="~/lib/htmx.min.js"></script>
    <script src="~/lib/_hyperscript.min.js"></script>
</head>

<body>
<partial name="_NavBar" model="profile"/>

<main role="main" class="flex flex-grow items-center">
    <partial name="_Notification"/>
    <div class="container mx-auto">
        <div class="px-5 lg:w-1/2 mx-auto">
            @RenderBody()
        </div>
    </div>
</main>

@await RenderSectionAsync("Scripts", false)

<footer class="text-center p-2 text-zinc-500 dark:text-slate-700 text-sm bg-zinc-400 dark:bg-slate-900">
    © 2023 Memodex Kamil Grudzień. Licensed under the GPLv3
</footer>

<script src="~/js/Pages/Shared/Notification.js" asp-append-version="true"></script>
<script src="~/js/Pages/Shared/ThemeToggle.js" asp-append-version="true"></script>
<script src="~/js/Pages/Shared/FlashcardEngage.js" asp-append-version="true"></script>
<script src="~/js/Infrastructure/KeyboardInput.js" asp-append-version="true"></script>
</body>
</html>
