<ds-alert [content]="'submission.sections.upload.info'"
          [dismissible]="true"
          [type]="AlertTypeEnum.Info"></ds-alert>

<ng-container *ngIf="fileList.length == 0">
  <div class="row">
    <div class="col-md-12">
      <div class="text-center h3"><span class="text-muted">{{'submission.sections.upload.no-file-uploaded' | translate}}</span></div>
    </div>
  </div>
</ng-container>

<ng-container *ngIf="fileList.length > 0">

  <div *ngIf="collectionDefaultAccessConditions.length > 0" class="row">
    <div class="col-sm-12" >
      <ds-alert [type]="AlertTypeEnum.Warning">
        <ng-container *ngIf="collectionPolicyType === 1">
          {{ 'submission.sections.upload.header.policy.default.nolist' | translate:{ "collectionName": collectionName } }}
        </ng-container>
        <ng-container *ngIf="collectionPolicyType === 2">
          {{ 'submission.sections.upload.header.policy.default.withlist' | translate:{ "collectionName": collectionName } }}
        </ng-container>
        <span class="clearfix"></span>
        <ds-submission-section-upload-access-conditions [accessConditions]="collectionDefaultAccessConditions"></ds-submission-section-upload-access-conditions>
      </ds-alert>
    </div>
  </div>

  <ng-container *ngFor="let fileEntry of fileList">
    <ds-themed-submission-upload-section-file
                                       [availableAccessConditionOptions]="availableAccessConditionOptions"
                                       [collectionId]="collectionId"
                                       [collectionPolicyType]="collectionPolicyType"
                                       [configMetadataForm]="(configMetadataForm$ | async)"
                                       [fileId]="fileIndexes[fileList.indexOf(fileEntry)]"
                                       [fileIndex]="fileList.indexOf(fileEntry)"
                                       [fileName]="fileNames[fileList.indexOf(fileEntry)]"
                                       [sectionId]="sectionData.id"
                                       [submissionId]="submissionId"></ds-themed-submission-upload-section-file>
    <div class="row">
      <div class="col-md-12">
        <hr/>
      </div>
    </div>
  </ng-container>
</ng-container>
