@using Microsoft.AspNetCore.Identity

@inject SignInManager<User> SignInManager
@inject UserManager<User> UserManager

<ul class="navbar-nav">
    @if (SignInManager.IsSignedIn(User))
    {
        <li class="nav-item rounded js-scroll-trigger">
            <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" title="Manage"> @UserManager.GetUserName(User) </a>
        </li>

        <li class="nav-item rounded js-scroll-trigger">
            <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger"  asp-action="Logout" asp-controller="Access" asp-route-returnUrl="/Home/Index"> Logout </a>

        </li>
       
    }
    else
    {
        <li class="nav-item mx-0 mx-lg-1">
            <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" id="register"  asp-action="Register" asp-controller="Access" asp-route-returnUrl="@Url.Action("Index", "Home")">Register</a>
        </li>
        <li class="nav-item mx-0 mx-lg-1">
            <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" id="login" asp-action="Login" asp-controller="Access">Login</a>
        </li>

    }
</ul>
