@page "/"

@using Microsoft.AspNetCore.Components.Web
@using Moonlight.Core.Services
@namespace Moonlight.Pages

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@inject FeatureService FeatureService

<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
    <meta charset="utf-8"/>
    <base href="~/"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Moonlight</title>

    <link rel="shortcut icon" href="/img/logo.svg">

    <!-- Assets (css) -->
    @foreach (var asset in FeatureService.PreInitContext.Assets)
    {
        foreach (var file in asset.Value.Where(x => x.EndsWith(".css")))
        {
            <link href="/api/core/asset/@(asset.Key)/@(file)" rel="stylesheet" type="text/css"/>
        }
    }

    <!-- Moonlight Themes -->

    <!-- Moonlight Default Theme by MasuOwO -->
    <link href="/css/theme.css" rel="stylesheet" type="text/css"/>

    <!-- Google Fonts: Iter -->
    <!-- TODO: Replace with local version -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700">

    <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered"/>
</head>
<body data-kt-app-header-fixed="true"
      data-kt-app-header-fixed-mobile="true"
      data-kt-app-sidebar-enabled="true"
      data-kt-app-sidebar-fixed="true"
      data-kt-app-sidebar-hoverable="true"
      data-kt-app-sidebar-push-toolbar="true"
      data-kt-app-sidebar-push-footer="true"
      class="app-default"
      data-kt-app-sidebar-minimize="on">

<component type="typeof(App)" render-mode="ServerPrerendered"/>

<!-- Assets (js) -->
@foreach (var asset in FeatureService.PreInitContext.Assets)
{
    foreach (var file in asset.Value.Where(x => x.EndsWith(".js")))
    {
        <script src="/api/core/asset/@(asset.Key)/@(file)"></script>
    }
}

<!-- BlazorTable Interop -->
<script src="/_content/BlazorTable/BlazorTable.min.js"></script>

<!-- Blazor server script -->
<script src="/_framework/blazor.server.js"></script>

</body>
</html>