<mat-toolbar color="primary">
    <button *ngIf="!(isWebView | async)" type="button" mat-icon-button (click)="onToggleNavigation();">
        <mat-icon>{{ navigationOpened ? 'close' : 'menu' }}</mat-icon>
    </button>
    <div class="home-link" routerLink="/">TadIS</div>
    <span class="fill"></span>
    <span>
        <button mat-icon-button [matMenuTriggerFor]="menu">
            <mat-icon>person</mat-icon>
        </button>
        <mat-menu #menu="matMenu" [overlapTrigger]="false">
            <ng-template [ngIf]="user === null">
                <button mat-menu-item routerLink="/login">
                    <mat-icon>verified_user</mat-icon>
                    <span>Přihlášení</span>
                </button>
                <button mat-menu-item routerLink="/register">
                    <mat-icon>person_add</mat-icon>
                    <span>Registrace</span>
                </button>
            </ng-template>
            <ng-template [ngIf]="user !== null">
                <button mat-menu-item routerLink="/profile">
                    <mat-icon>account_circle</mat-icon>
                    <span>Můj profil</span>
                </button>
                <button *ngIf="roleUtil.hasAdminRights(user)" mat-menu-item routerLink="/profiles">
                    <mat-icon>people</mat-icon>
                    <span>Uživatelé</span>
                </button>
                <button mat-menu-item (click)="onLogout()">
                    <mat-icon>exit_to_app</mat-icon>
                    <span>Odhlásit se</span>
                </button>
            </ng-template>
        </mat-menu>
    </span>
</mat-toolbar>
<mat-progress-bar [style.visibility]="loading ? 'visible' : 'hidden'" mode="indeterminate" color="accent" hidden="true">
</mat-progress-bar>