<div *ngIf="isProcessing" class="process"
	fxLayout="column"
	fxLayoutAlign="space-around center">
	<mat-spinner></mat-spinner>
</div>
<div *ngIf="!isProcessing" class="container"
	fxLayout="column"
	fxLayoutAlign="space-around center">
	<div class="radioprocess">
		<mat-radio-group [(ngModel)]="defaultOp" fxLayout="row" fxLayoutAlign="space-around center">
			<mat-radio-button style="margin: 10px; font-size: normal;" *ngFor="let operation of operations" [value]="operation">
				{{operation}}
			</mat-radio-button>
		</mat-radio-group>
	</div>
	<table border="0" cellspacing="1" cellpadding="1">
		<thead>
			<tr>
				<th></th>
				<ng-container *ngFor="let day of schedule">
					<th>{{day.name}}</th>
				</ng-container>
			</tr>
		</thead>
			<tr *ngFor="let i of [].constructor(schedRows); let r = index">
				<td>{{schedule[0].horaires[r].name}}</td>
				<td *ngFor="let j of [].constructor(schedCols); let s = index" [ngStyle]="{'background-color': schedule[s].horaires[r].state? 'green':'red'}" (click)="updateCell(s, r)">
			</tr>
	</table>

	<button mat-raised-button color="primary" [disabled]="isDisabled" (click)="onUpdate()">{{buttonText}}</button>
</div>
