@using FoodsharingSiegen.Contracts.Enums
<nav class="d-flex flex-column h-100">
    <div class="nav-logo"></div>
    <div class="d-flex px-3 justify-content-center text-center font-weight-bold">
        Einarbeitungen<br/>
        @(AppSettings.Terms.TitleShort ?? AppSettings.Terms.Title)
    </div>
    <div class="d-flex px-3 mt-3 justify-content-center text-center font-weight-bold">
        Hallo @CurrentUser.Name!
    </div>

    <hr/>

    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="fas fa-user-plus mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Einarbeiten
            </NavLink>
        </div>
    </div>
    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="verify" Match="NavLinkMatch.All">
                <span class="fas fa-user-pen mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Freischalten
            </NavLink>
        </div>
    </div>
    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="done" Match="NavLinkMatch.All">
                <span class="fas fa-user-check mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Fertig
            </NavLink>
        </div>
    </div>
    
    @if (CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))
    {
        <hr/>
        <div class="nav-item px-3">
            <div @onclick="NavLinkClickedAsync">
                <NavLink class="nav-link" href="all" Match="NavLinkMatch.All">
                    <span class="fas fa-box-archive mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Alle / Archiv
                </NavLink>
            </div>
        </div>
    }

    <hr/>

    @if (CurrentUser.IsAdmin())
    {
        <div class="nav-item px-3">
            <div @onclick="NavLinkClickedAsync">
                <NavLink class="nav-link" href="users" Match="NavLinkMatch.All">
                    <span class="fas fa-users mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Benutzer
                </NavLink>
            </div>
        </div>

        <div class="nav-item px-3 pb-0">
            <div @onclick="NavLinkClickedAsync">
                <NavLink class="nav-link" href="settings" Match="NavLinkMatch.All">
                    <span class="fas fa-cog mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Einstellungen
                </NavLink>
            </div>
        </div>
    }

    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="audit" Match="NavLinkMatch.All">
                <span class="fa-solid fa-clock-rotate-left mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Aktivitäten
            </NavLink>
        </div>
    </div>

    <div class="flex-grow-1"></div>
    
    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="profile" Match="NavLinkMatch.All">
                <span class="fas fa-user mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Mein Profil
            </NavLink>
        </div>
    </div>
    
    <div class="nav-item px-3">
        <div @onclick="NavLinkClickedAsync">
            <NavLink class="nav-link" href="logout" Match="NavLinkMatch.All">
                <span class="fa-solid fa-door-open mr-2" aria-hidden="true" style="font-size: 1.4em;"></span> Ausloggen
            </NavLink>
        </div>
    </div>
    
    <div class="pb-1 text-center small">@($"v{Version ?? "0"}")</div>
</nav>