<ion-app>
  <ion-split-pane contentId="main-content">
    <ion-menu contentId="main-content" type="overlay" *ngIf="restService.isUserLoggedIn && !restService.isLoginPage">
      <ion-header>
        <ion-toolbar color="awPrimary">
          <ion-title>AWADO</ion-title>
          <div class="ion-text">
            {{"Welcome, " + (userService.userDetails.username || "Guest")}}
          </div>
        </ion-toolbar>
      </ion-header>
      <ion-content>
        <ion-list>
          <ion-menu-toggle auto-hide="false" *ngFor="let p of appPages">
            <ion-item [routerDirection]="'root'" [routerLink]="[p.url]" routerLinkActive="active-link">
              <ion-icon color="awPrimary" slot="start" [name]="p.icon"></ion-icon>
              <ion-label color="awPrimary">
                {{p.title}}
              </ion-label>
            </ion-item>
          </ion-menu-toggle>
        </ion-list>
      </ion-content>
    </ion-menu>
    <ion-router-outlet id="main-content"></ion-router-outlet>
  </ion-split-pane>
</ion-app>
