@using Marechai.Database.Models
@{
    /******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s)      : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
//     This program is free software: you can redistribute it and/or modify
//     it under the terms of the GNU General Public License as
//     published by the Free Software Foundation, either version 3 of the
//     License, or (at your option) any later version.
//
//     This program is distributed in the hope that it will be useful,
//     but WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//     GNU General Public License for more details.
//
//     You should have received a copy of the GNU General Public License
//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2026 Natalia Portillo
*******************************************************************************/
}
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser>   UserManager
<ul class="navbar-nav">
    @if(SignInManager.IsSignedIn(User))
    {
        <li class="nav-item">
            <a asp-area="Identity" asp-page="/Account/Manage/Index" class="nav-link text-dark" id="manage"
               title="Manage">Hello @UserManager.GetUserName(User)!</a>
        </li>
        <li class="nav-item">
            <form asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/Index",
                                                                                                new
                                                                                                {
                                                                                                    area = ""
                                                                                                })" class="form-inline"
                  id="logoutForm">
                <button class="btn btn-link nav-link text-dark" id="logout" type="submit">Logout</button>
            </form>
        </li>
    }
    else
    {
        <li class="nav-item">
            <a asp-area="Identity" asp-page="/Account/Register" class="nav-link text-dark" id="register">Register</a>
        </li>
        <li class="nav-item">
            <a asp-area="Identity" asp-page="/Account/Login" class="nav-link text-dark" id="login">Login</a>
        </li>
    }
</ul>