<!-- Read only. -->
<ion-item text-wrap *ngIf="files && files.length && !edit">
    <h2>{{plugin.name}}</h2>
    <div no-lines>
        <ng-container *ngFor="let file of files">
            <!-- Files already attached to the submission. -->
            <core-file *ngIf="!file.name" [file]="file" [component]="component" [componentId]="assign.cmid" [alwaysDownload]="true"></core-file>

            <!-- Files stored in offline to be sent later. -->
            <core-local-file *ngIf="file.name" [file]="file"></core-local-file>
        </ng-container>
    </div>
</ion-item>

<!-- Edit -->
<div *ngIf="edit">
    <ion-item-divider text-wrap color="light">{{plugin.name}}</ion-item-divider>
    <core-attachments [files]="files" [maxSize]="configs.maxsubmissionsizebytes" [maxSubmissions]="configs.maxfilesubmissions" [component]="component" [componentId]="assign.cmid" [acceptedTypes]="configs.filetypeslist" [allowOffline]="allowOffline"></core-attachments>
</div>
