<!--<mat-list>
  <div mat-subheader>Folders</div>
  <mat-list-item *ngFor="let folder of files">
    <mat-icon matListItemIcon>insert_drive_file</mat-icon>
    <div matListItemTitle>{{folder.name}}</div>
    <span matListItemLine>{{folder.commitDate | date}}</span>
  </mat-list-item>
</mat-list>
-->
<mat-accordion>
    <div class="flex-container">
        <h1>
            Files
        </h1>
        <mat-list-item *ngFor="let file of files">
            <mat-expansion-panel hideToggle>
                <mat-expansion-panel-header>
                    <mat-panel-title>
                        {{file.name}}
                    </mat-panel-title>
                </mat-expansion-panel-header>
                <div>
                <mat-form-field class="form-field-css">
                    <textarea matInput id="file-text" type="text" readonly="True" [rows]="file.content.split('\n').length" [(ngModel)]="file.content"></textarea>
                </mat-form-field>
                <button mat-raised-button color="primary" style="margin-right: 10px;" (click)="allowEditFile()">Edit</button>
                <button mat-raised-button color="primary" (click)="submitFile(file.id,file.content)">Save</button>
                </div>
            </mat-expansion-panel>
        </mat-list-item>
    </div>
</mat-accordion>
