<div class="main-content">
	<div class="container-fluid dmp-profile-listing">
		<h3>{{titlePrefix}} {{'DMP-PROFILE-LISTING.TITLE' | translate}}</h3>

		<app-dmp-profile-criteria-component></app-dmp-profile-criteria-component>
		<mat-card class="row mat-card">
			<mat-table [dataSource]="dataSource" matSort (matSortChange)="refresh()">

				<!-- Column Definition: Name -->
				<ng-container cdkColumnDef="label">
					<mat-header-cell *matHeaderCellDef mat-sort-header="label">
						{{'DMP-PROFILE-LISTING.COLUMNS.NAME' | translate}}</mat-header-cell>
					<mat-cell *matCellDef="let row">{{row.label}}</mat-cell>
				</ng-container>

				<!-- Column Definition: status -->
				<ng-container cdkColumnDef="status">
					<mat-header-cell *matHeaderCellDef mat-sort-header="status">
						{{'DMP-PROFILE-LISTING.COLUMNS.STATUS' | translate}}</mat-header-cell>
					<mat-cell *matCellDef="let row">{{row.status}}</mat-cell>
				</ng-container>

				<!-- Column Definition: Created -->
				<ng-container cdkColumnDef="created">
					<mat-header-cell *matHeaderCellDef mat-sort-header="created">
						{{'DMP-PROFILE-LISTING.COLUMNS.CREATED' | translate}}</mat-header-cell>
					<mat-cell *matCellDef="let row">{{row.created | date:'shortDate'}}</mat-cell>
				</ng-container>

				<!-- Column Definition: Submission Time -->

				<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
				<mat-row *matRowDef="let row; columns: displayedColumns" (click)="rowClick(row.id)"></mat-row>
				<!-- (click)="rowClick(row.id)" -->

			</mat-table>
			<mat-paginator #paginator [length]="dataSource?.totalCount" [pageSizeOptions]="[10, 25, 100]">
			</mat-paginator>
		</mat-card>

		<div class="row justify-content-end pr-2">
			<button mat-fab class="mat-fab-bottom-right" color="primary" [routerLink]="['/dmp-profiles/new'] ">
				<mat-icon class="mat-24">add</mat-icon>
			</button>
		</div>
	</div>
</div>
