<!-- START Top Navbar-->
<nav class="navbar topnavbar navbar-expand-lg navbar-light" role="navigation">
    <!-- START navbar header-->
    <div class="navbar-header">
        <a class="navbar-brand" href="#/">
            <div class="brand-logo">
                <img class="img-fluid" src="assets/img/logo.jpg" alt="App Logo" />
            </div>
            <div class="brand-logo-collapsed">
                <img class="img-fluid" src="assets/img/logo-single.jpg" alt="App Logo" />
            </div>
        </a>
       <button class="navbar-toggler" type="button" (click)="navCollapsed = !navCollapsed">
          <span class="navbar-toggler-icon"></span>
       </button>
    </div>
    <!-- END navbar header-->
    <!-- START Nav wrapper-->
    <div class="navbar-collapse collapse" [collapse]="navCollapsed">
        <!-- Navbar Menu -->
        <ul class="nav navbar-nav mr-auto flex-column flex-lg-row">
            <li class="nav-item" *ngFor="let item of menuItems" [ngClass]="{'dropdown': item.submenu}" dropdown>
                <a class="nav-link" *ngIf="!item.heading && !item.submenu" [routerLink]="item.link" [title]="item.text">
                    <span>{{(item.translate | translate) || item.text}}</span>
                </a>
                <a class="nav-link dropdown-toggle dropdown-toggle-nocaret" dropdownToggle *ngIf="item.submenu">
                    <span>{{(item.translate | translate) || item.text}}</span>
                </a>
                <!-- START Dropdown menu-->
                <div *dropdownMenu class="dropdown-menu animated fadeInUp">
                    <a class="dropdown-item" *ngFor="let subitem of item.submenu" [routerLink]="subitem.link" [title]="subitem.text" >
                        <span>{{(subitem.translate | translate) || subitem.text}}</span>
                    </a>
                </div>
            </li>
        </ul>
        <!-- End Navbar Menu-->
        <!-- START Right Navbar-->
        <ul class="navbar-nav flex-row">
            <!-- START lock screen-->
            <li class="nav-item">
                <a class="nav-link" title="Lock screen" [routerLink]="'/lock'">
                    <em class="icon-lock"></em>
                </a>
            </li>
            <!-- END lock screen-->
            <!-- Search icon-->
            <li class="nav-item">
                <a class="nav-link" (click)="openNavSearch($event)">
                    <em class="icon-magnifier"></em>
                </a>
            </li>
            <!-- Fullscreen (only desktops)-->
            <li class="nav-item d-none d-md-block">
                <a class="nav-link" #fsbutton (click)="toggleFullScreen($event)">
                    <em class="fa fa-expand"></em>
                </a>
            </li>
            <!-- START Alert menu-->
            <li class="nav-item dropdown dropdown-list" dropdown>
                <a class="nav-link dropdown-toggle dropdown-toggle-nocaret" dropdownToggle>
                    <em class="icon-bell"></em>
                    <span class="badge badge-danger">11</span>
                </a>
                <!-- START Dropdown menu-->
                <div *dropdownMenu class="dropdown-menu dropdown-menu-right animated flipInX">
                    <div class="dropdown-item">
                        <!-- START list group-->
                        <div class="list-group">
                           <!-- list item-->
                           <div class="list-group-item list-group-item-action">
                              <div class="media">
                                 <div class="align-self-start mr-2">
                                    <em class="fab fa-twitter fa-2x text-info"></em>
                                 </div>
                                 <div class="media-body">
                                    <p class="m-0">New followers</p>
                                    <p class="m-0 text-muted text-sm">1 new follower</p>
                                 </div>
                              </div>
                           </div>
                           <!-- list item-->
                           <div class="list-group-item list-group-item-action">
                              <div class="media">
                                 <div class="align-self-start mr-2">
                                    <em class="fa fa-envelope fa-2x text-warning"></em>
                                 </div>
                                 <div class="media-body">
                                    <p class="m-0">New e-mails</p>
                                    <p class="m-0 text-muted text-sm">You have 10 new emails</p>
                                 </div>
                              </div>
                           </div>
                           <!-- list item-->
                           <div class="list-group-item list-group-item-action">
                              <div class="media">
                                 <div class="align-self-start mr-2">
                                    <em class="fa fa-tasks fa-2x text-success"></em>
                                 </div>
                                 <div class="media-body">
                                    <p class="m-0">Pending Tasks</p>
                                    <p class="m-0 text-muted text-sm">11 pending task</p>
                                 </div>
                              </div>
                           </div>
                           <!-- last list item-->
                           <div class="list-group-item list-group-item-action">
                              <span class="d-flex align-items-center">
                                 <span class="text-sm">More notifications</span>
                                 <span class="badge badge-danger ml-auto">14</span>
                              </span>
                           </div>
                        </div>
                        <!-- END list group-->
                    </div>
                </div>
                <!-- END Dropdown menu-->
            </li>
            <!-- END Alert menu-->
            <!-- START Offsidebar button-->
            <li class="nav-item">
                <a class="nav-link" (click)="toggleOffsidebar(); $event.stopPropagation()">
                    <em class="icon-notebook"></em>
                </a>
            </li>
            <!-- END Offsidebar menu-->
        </ul>
        <!-- END Right Navbar-->
    </div>
    <!-- END Nav wrapper-->
    <app-navsearch [visible]="getNavSearchVisible()" (onclose)="setNavSearchVisible(false)"></app-navsearch>
</nav>
<!-- END Top Navbar-->
