<div class="console-app__registrar">
  <button
    mat-button
    [routerLink]="'/settings/registrars'"
    routerLinkActive="active"
    *ngIf="isMobile; else desktop"
  >
    {{ registrarService.activeRegistrarId || "Select registrar" }}
    <mat-icon>open_in_new</mat-icon>
  </button>
  <ng-template #desktop>
    <mat-form-field class="mat-form-field-density-5" appearance="fill">
      <mat-label>Registrar</mat-label>
      <mat-select
        [ngModel]="registrarService.activeRegistrarId"
        (selectionChange)="registrarService.updateRegistrar($event.value)"
      >
        <mat-option
          *ngFor="let registrar of registrarService.registrars"
          [value]="registrar.registrarId"
        >
          {{ registrar.registrarId }}
        </mat-option>
      </mat-select>
    </mat-form-field>
  </ng-template>
</div>
