<div class="main-content">
	<div class="container-fluid">
		<div class="card">
			<div class="card-header card-header-plain d-flex">
				<div class="card-desc d-flex flex-column justify-content-center">
					<h4 class="card-title">{{'GRANT-LISTING.TITLE' | translate}}</h4>
					<!-- <p class="card-category">{{'GRANT-LISTING.SUBTITLE' | translate}}</p> -->
				</div>
				<div class="d-flex align-items-center ml-auto p-2">
					<button mat-raised-button color="primary" class="text-uppercase lightblue-btn" [routerLink]="['./new']">
						<mat-icon>add</mat-icon> {{'GRANT-LISTING.ACTIONS.NEW' | translate}}
					</button>
				</div>
			</div>
			<div class="card-body table-responsive">
				<div class="grant-listing row">
					<div class="col-3">
						<app-grant-criteria-component class="col-auto"></app-grant-criteria-component>
					</div>
					<div class="col-9">
						<div class="row" *ngFor="let item of listingItems; let i = index">
							<app-grant-listing-item-component class="col-12" [showDivider]="i !== (listingItems.length - 1)" [grant]="item" (onClick)="rowClicked($event)"></app-grant-listing-item-component>
						</div>
						<mat-paginator #paginator [length]="totalCount" [pageSizeOptions]="[10, 25, 100]" (page)="pageThisEvent($event)" class="mt-2"></mat-paginator>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!--
<div class="main-content">
	<div class="container-fluid">
		<h3>{{languageResolverService.getBy('listingTitle') | translate}}</h3>
		<app-grant-criteria-component></app-grant-criteria-component>
		<mat-card class="mat-card">
			<mat-card-content>
				<div class="row">
					<mat-table class="col-md-12" [dataSource]="dataSource" matSort (matSortChange)="refresh()">

						<ng-container cdkColumnDef="avatar">
							<mat-header-cell *matHeaderCellDef mat-sort-header="avatar">{{'GRANT-LISTING.COLUMNS.AVATAR' | translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row">
								<img mat-card-avatar [src]="host+'files/'+row.files[0].id+'?location='+row.files[0].location+'&type='+row.files[0].type">
							</mat-cell>
						</ng-container>
						<ng-container cdkColumnDef="name">
							<mat-header-cell *matHeaderCellDef mat-sort-header="label">{{'GRANT-LISTING.COLUMNS.NAME' | translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row">{{row.label}}</mat-cell>
						</ng-container>
						<ng-container cdkColumnDef="abbreviation">
							<mat-header-cell *matHeaderCellDef mat-sort-header="abbreviation">{{'GRANT-LISTING.COLUMNS.ABBREVIATION' |
								translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row"> {{row.abbreviation}} </mat-cell>
						</ng-container>
						<ng-container cdkColumnDef="start">
							<mat-header-cell *matHeaderCellDef mat-sort-header="startdate">{{'GRANT-LISTING.COLUMNS.START' | translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row"> {{row.startDate | date:'shortDate'}} </mat-cell>
						</ng-container>
						<ng-container cdkColumnDef="end">
							<mat-header-cell *matHeaderCellDef mat-sort-header="enddate">{{'GRANT-LISTING.COLUMNS.END' | translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row"> {{row.endDate | date:'shortDate'}} </mat-cell>
						</ng-container>
						<ng-container cdkColumnDef="dmps">
							<mat-header-cell *matHeaderCellDef>{{'GRANT-LISTING.COLUMNS.DMPS' | translate}}</mat-header-cell>
							<mat-cell *matCellDef="let row" (click)="$event.stopPropagation()">
								<app-url-listing [items]="row.dmps" [urlLimit]="5" [parameters]="{ grantLabel: row.label }"></app-url-listing>
							</mat-cell>
						</ng-container>

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

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

		<button mat-fab class="mat-fab-bottom" style="float: right;" color="primary" [routerLink]=" ['./new'] ">
			<mat-icon class="mat-24">add</mat-icon>
		</button>
	</div>
</div> -->
