<vdr-action-bar>
    <vdr-ab-right>
        <a class="btn btn-primary" [routerLink]="['./create']">
            <clr-icon shape="plus"></clr-icon>
            {{ 'admin.create-new-administrator' | translate }}
        </a>
    </vdr-ab-right>
</vdr-action-bar>

<vdr-data-table
    [items]="items$ | async"
    [itemsPerPage]="itemsPerPage$ | async"
    [totalItems]="totalItems$ | async"
    [currentPage]="currentPage$ | async"
    (pageChange)="setPageNumber($event)"
    (itemsPerPageChange)="setItemsPerPage($event)"
>
    <vdr-dt-column>{{ 'common.ID' | translate }}</vdr-dt-column>
    <vdr-dt-column>{{ 'settings.first-name' | translate }}</vdr-dt-column>
    <vdr-dt-column>{{ 'settings.last-name' | translate }}</vdr-dt-column>
    <vdr-dt-column>{{ 'settings.email-address' | translate }}</vdr-dt-column>
    <vdr-dt-column></vdr-dt-column>
    <ng-template let-administrator="item">
        <td class="left align-middle">{{ administrator.id }}</td>
        <td class="left align-middle">{{ administrator.firstName }}</td>
        <td class="left align-middle">{{ administrator.lastName }}</td>
        <td class="left align-middle">{{ administrator.emailAddress }}</td>
        <td class="right align-middle">
            <vdr-table-row-action
                iconShape="edit"
                [label]="'common.edit' | translate"
                [linkTo]="['./', administrator.id]"
            ></vdr-table-row-action>
        </td>
    </ng-template>
</vdr-data-table>
