@using Microsoft.AspNetCore.Identity
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager

<ul class="navbar-nav">
@if (SignInManager.IsSignedIn(User))
{
    <li class="nav-item">
        <!--
        <a  class="nav-link text-white" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage"></a>
        -->
            <span class="nav-link text-white">Hola, @User.Identity?.Name!</span>
    </li>
    <li class="nav-item">
        <form  class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
            <button  type="submit" class="nav-link btn btn-link text-white">Salir</button>
        </form>
    </li>
}
else
{
    <li class="nav-item">
        <a class="nav-link text-info" asp-area="Identity" asp-page="/Account/Register">Registro</a>
    </li>
    <li class="nav-item">
        <a class="nav-link text-info" asp-area="Identity" asp-page="/Account/Login">Acesso</a>
    </li>
}
</ul>
