<h1 style="text-align: center;">Buchung anlegen</h1>
<mat-dialog-content>
  <div class="selected_players">
    <div class="header">Gewählte Spieler:</div>
    <ng-container *ngIf="!this.data.all">
      <div *ngFor="let p of data.players | slice:0:5" class="selected_players__entry">{{ p.firstName }} {{ p.lastName }}</div>
      <div *ngIf="data.players.length > 5">
        + {{ data.players.length - 5 }} weitere
      </div>
    </ng-container>
    <ng-container *ngIf="this.data.all">
      
      <div class="selected_players__entry" style="text-align: center; margin: 8px;">Gesamte Mannschaft</div>
    </ng-container>
  </div>

  <app-transaction-form #formComponent class="form"></app-transaction-form>
</mat-dialog-content>

<div class="summary">
  <div class="mat-body">Jeder Spieler bekommt <span style="font-style: italic;">{{ transactionType }} über {{ amount | currency:'EUR' }}</span></div>
</div>

<mat-dialog-actions>
  <button mat-button color="warn" (click)="close()">Schließen</button>
  <button mat-button color="primary" (click)="create()" [disabled]="!formValid">Anlegen</button>
</mat-dialog-actions>
