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

<ul class="navbar-nav">
@if (SignInManager.IsSignedIn(User))
{
    @* <span class="nav-link text-dark" asp-area="Identity" title="Manage">Witaj @User.Identity?.Name!</span> *@
    <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">Wyloguj</button>
        </form>
    </li>
}
else
{
@*     <li class="nav-item">
        <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a>
    </li>
 *@    <li class="nav-item">
            <a class="nav-link text-white" asp-area="Identity" asp-page="/Account/Login">Logowanie</a>
    </li>
}
</ul>
