<header mat-dialog-title *ngIf="isTypeList">{{ 'VERSION.DIALOG_ADF.TITLE' | translate }}</header>
<header mat-dialog-title *ngIf="!isTypeList">{{ 'VERSION.DIALOG.TITLE' | translate }}</header>
<section mat-dialog-content *ngIf="!isTypeList">
  <adf-version-comparison id="adf-version-comparison" [newFileVersion]="file" [node]="node"></adf-version-comparison>
  <adf-version-upload
    id="adf-version-upload-button"
    [node]="node"
    [newFileVersion]="file"
    (success)="handleUpload($event)"
    (cancel)="handleCancel()"
    (error)="onUploadError($event)"
  >
  </adf-version-upload>
</section>
<ng-container *ngIf="isTypeList">
  <section mat-dialog-content>
    <div class="adf-version-list-container">
      <div class="adf-version-list-table">
        <adf-version-list
          [node]="node"
          [showComments]="'adf-version-manager.allowComments' | adfAppConfig: true"
          [allowDownload]="'adf-version-manager.allowDownload' | adfAppConfig: true"
          (deleted)="refresh($event)"
          (restored)="refresh($event)"
          (viewVersion)="onViewingVersion($event)"
        ></adf-version-list>
      </div>
    </div>
  </section>
  <footer mat-dialog-actions>
    <button mat-button color="primary" [mat-dialog-close]="true">{{ 'VERSION.DIALOG_ADF.CLOSE' | translate }}</button>
  </footer>
</ng-container>
