<!-- <button class="user-button" mat-stroked-mini-fab [matMenuTriggerFor]="userMenu">
  <mat-icon class="user-button__icon" style="left: -1px;position: relative;">person</mat-icon>
</button> -->

<div *ngIf="this._router.url != '/auth/login' ">
  
<button mat-icon-button  aria-label="Example icon button with a person icon" [matMenuTriggerFor]="userMenu">
  <!-- <mat-icon style="margin-left:-3px;color:white;margin-bottom: 2px;">person</mat-icon> -->
  <!-- <img src="assets/img/user.png" alt="" class="img-fluid" style="height: 35px;transform: translateY(-5px);"> -->

    <button *ngIf="secuLevel != 'B'" mat-mini-fab  style="transform: translateY(-5px);background-color: #46AC9E;">
     {{username?.charAt(0)?.toUpperCase()}}
    </button>

    <button *ngIf="secuLevel == 'B'" class="adminButtom" mat-mini-fab   >
      <span style="font-weight: 900;">{{username.charAt(0).toUpperCase()}}</span>
     </button>

</button>
<mat-menu #userMenu="matMenu" xPosition="before">
  <div class="user-menu-title">

    <div>
      <!-- <img src="assets/img/user.png" alt="" *ngIf="!adminUser" class="img-fluid" style="height: 40px;">
      <img src="assets/img/admin.png" alt="" *ngIf="adminUser" class="img-fluid" style="height: 40px;"> -->
      <button mat-mini-fab   style="transform: translateY(-5px);background-color: #46AC9E;box-shadow: none; pointer-events: none;">
        {{username?.charAt(0)?.toUpperCase()}}
       </button>
      <!-- <img src="assets/img/user.svg" alt=""> -->
    </div>
    <span class="user-menu-title__name" style="font-weight: 600;text-align: center;">{{getUser()}} </span>

    <p class="user-menu-title__name" >{{getEmail()}} </p>
    <!-- <a class="user-menu-title__link" [href]="flatlogicEmail">Flatlogic.com</a> -->
  </div>
  <button mat-menu-item class="user-menu__item-title" hidden="true">
    <mat-icon class="user-menu-icon">person</mat-icon> {{ 'profile' | translate }}
  </button>
  <button mat-menu-item class="user-menu__item-title" hidden="true">
    <mat-icon class="user-menu-icon">description</mat-icon> {{ 'tasks' | translate }}
  </button>
  <button mat-menu-item class="user-menu__item-title" hidden="true">
    <mat-icon class="user-menu-icon">email</mat-icon> {{ 'messages' | translate }}
  </button>
  <div class="sign-button-wrapper">
    <button class="sign-button"  mat-flat-button (click)="signOutEmit()" *ngIf="(!this._router.url.includes('auth')) "> 
      {{ 'signOut' | translate }} <mat-icon style="font-size: large;transform: translateY(2px);">power_settings_new</mat-icon></button>
    <button class="sign-button" mat-flat-button (click)="signOutEmit()" *ngIf="this._router.url.includes('auth')"> {{ 'signIn' | translate }} </button>
  </div>
</mat-menu>

</div>