<div class="admin-sub-header">
  <div i18n class="form-sub-title">Blacklisted videos</div>
</div>

<p-table
  [value]="blacklist" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
>
  <ng-template pTemplate="header">
    <tr>
      <th i18n pSortableColumn="name">Name <p-sortIcon field="name"></p-sortIcon></th>
      <th i18n>Description</th>
      <th i18n pSortableColumn="views">Views <p-sortIcon field="views"></p-sortIcon></th>
      <th i18n>NSFW</th>
      <th i18n>UUID</th>
      <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
      <th></th>
    </tr>
  </ng-template>

  <ng-template pTemplate="body" let-videoBlacklist>
    <tr>
      <td>{{ videoBlacklist.name }}</td>
      <td>{{ videoBlacklist.description }}</td>
      <td>{{ videoBlacklist.views }}</td>
      <td>{{ videoBlacklist.nsfw }}</td>
      <td>{{ videoBlacklist.uuid }}</td>
      <td>{{ videoBlacklist.createdAt }}</td>
      <td class="action-cell">
        <my-delete-button i18n-label label="Unblacklist" (click)="removeVideoFromBlacklist(videoBlacklist)"></my-delete-button>
      </td>
    </tr>
  </ng-template>
</p-table>

