<ng-container *ngIf="fileData">
  <div class="row">
    <div class="col-md-12">
      <div class="float-left w-75">
        <h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
      </div>
      <div class="float-right w-15">
        <ng-container>
          <ds-themed-file-download-link [cssClasses]="'btn btn-link-focus'" [isBlank]="true"
                                        [bitstream]="getBitstream()" [enableRequestACopy]="false">
            <i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i>
          </ds-themed-file-download-link>
          <button class="btn btn-link-focus"
                  [attr.aria-label]="'submission.sections.upload.edit.title' | translate"
                  title="{{ 'submission.sections.upload.edit.title' | translate }}"
                  (click)="$event.preventDefault();editBitstreamData();">
            <i class="fa fa-edit fa-2x text-normal"></i>
          </button>
          <button class="btn btn-link-focus"
                  [attr.aria-label]="'submission.sections.upload.delete.confirm.title' | translate"
                  title="{{ 'submission.sections.upload.delete.confirm.title' | translate }}"
                  [disabled]="(processingDelete$ | async)"
                  (click)="$event.preventDefault();confirmDelete(content);">
            <i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
            <i *ngIf="!(processingDelete$ | async)" class="fa fa-trash fa-2x text-danger"></i>
          </button>
        </ng-container>
      </div>
      <div class="clearfix"></div>
      <ds-submission-section-upload-file-view [fileData]="fileData"></ds-submission-section-upload-file-view>
    </div>
  </div>
</ng-container>

<ng-template #content let-c="close" let-d="dismiss">
  <div class="modal-header">
    <h4 class="modal-title text-danger">{{ 'submission.sections.upload.delete.confirm.title' | translate }}</h4>
    <button type="button" class="close" aria-label="Close" (click)="d('cancel')">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
  <div class="modal-body">
    <p>{{ 'submission.sections.upload.delete.confirm.info' | translate }}</p>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-secondary"
            (click)="c('cancel')">{{ 'submission.sections.upload.delete.confirm.cancel' | translate }}</button>
    <button type="button" class="btn btn-danger"
            (click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
  </div>
</ng-template>
