<div class="fl-content-min-height fl-content">
  <div *ngIf="emailMessageLogEntries && !emailMessageLogEntries.length" class="fl-heading-md fl-gray-color"
       i18n>No email messages
  </div>
  <app-fl-backdrop *ngIf="!emailMessageLogEntries" overlayParent></app-fl-backdrop>
  <div *ngIf="emailMessageLogEntries" layoutDirection="column">
    <table class="full-width" mat-table [dataSource]="emailMessageLogEntries">
      <ng-container matColumnDef="created_at">
        <th mat-header-cell *matHeaderCellDef i18n>Entry date</th>
        <td mat-cell *matCellDef="let emailMessage">
          <a [routerLink]="[config.getPanelUrl('utilities/email-message-log'), emailMessage.id]">
            <app-date-displayer [date]="emailMessage.created_at"></app-date-displayer>
          </a>
        </td>
      </ng-container>
      <ng-container matColumnDef="subject">
        <th mat-header-cell *matHeaderCellDef i18n>Subject</th>
        <td mat-cell *matCellDef="let emailMessage">
          <a [routerLink]="[config.getPanelUrl('utilities/email-message-log'), emailMessage.id]">
            {{emailMessage.subject}}
          </a>
        </td>
      </ng-container>
      <ng-container matColumnDef="to">
        <th mat-header-cell *matHeaderCellDef i18n>To</th>
        <td mat-cell *matCellDef="let emailMessage">
          <a [routerLink]="[config.getPanelUrl('utilities/email-message-log'), emailMessage.id]">
            {{emailMessage.to}}
          </a>
        </td>
      </ng-container>
      <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
      <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    </table>
  </div>
</div>
