@inherits LayoutComponentBase

<div class="d-flex" style="min-height: 100vh;">
    <nav class="bg-dark text-light p-3" style="width: 220px;">
        <h5 class="mb-4">OtOpcUa Admin</h5>
        <ul class="nav flex-column">
            <li class="nav-item"><a class="nav-link text-light" href="/">Overview</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/fleet">Fleet status</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/hosts">Host status</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/clusters">Clusters</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/reservations">Reservations</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/certificates">Certificates</a></li>
            <li class="nav-item"><a class="nav-link text-light" href="/role-grants">Role grants</a></li>
        </ul>

        <div class="mt-5">
            <AuthorizeView>
                <Authorized>
                    <div class="small text-light">
                        Signed in as <a class="text-light" href="/account"><strong>@context.User.Identity?.Name</strong></a>
                    </div>
                    <div class="small text-muted">
                        @string.Join(", ", context.User.Claims.Where(c => c.Type.EndsWith("/role")).Select(c => c.Value))
                    </div>
                    <form method="post" action="/auth/logout">
                        <button class="btn btn-sm btn-outline-light mt-2" type="submit">Sign out</button>
                    </form>
                </Authorized>
                <NotAuthorized>
                    <a class="btn btn-sm btn-outline-light" href="/login">Sign in</a>
                </NotAuthorized>
            </AuthorizeView>
        </div>
    </nav>
    <main class="flex-grow-1 p-4">
        @Body
    </main>
</div>
