@using Microsoft.AspNetCore.Identity

@inject SignInManager<AnidoptUser> SignInManager
@inject UserManager<AnidoptUser> UserManager

<ul class="navbar-nav">
    @if (SignInManager.IsSignedIn(User))
    {
        <li class="nav-item">
            <a class="nav-link text-dark" asp-controller="Accounts" asp-action="Details">Account</a>
        </li>
        @if (User.IsInRole("SiteAdmin"))
        {
            <li class="nav-item">
                <a class="nav-link text-dark" asp-area="" asp-controller="SiteAdmin" asp-action="AdminPanel">Admin Panel</a>
            </li>
        }
        @if (User.IsInRole("SiteAdmin") || User.IsInRole("OrganisationAdmin"))
        {
             <li class="nav-item">
                <a class="nav-link text-dark" asp-area="" asp-controller="Accounts" asp-action="Index">Organisation Users</a>
            </li>           
        }
        <li class="nav-item">
            <a class="nav-link text-dark" asp-controller="Accounts" asp-action="Logout">Logout</a>
        </li>
    }
    else
    {
@*        <li class="nav-item">
            <a class="nav-link text-dark" asp-controller="Accounts" asp-action="Register">Register</a>
        </li>*@
        <li class="nav-item">
            <a class="nav-link text-dark" asp-controller="Accounts" asp-action="Login">Login</a>
        </li>
    }
</ul>
