<div id="viewer-cont" [ngClass]="{ opened: opened }" (click)="clickOutside($event)">
  <div id="media-cont">
    <div id="image-cont">
      <mat-progress-bar [mode]="currentChunk === 0 ? 'indeterminate' : 'determinate'" [value]="(currentChunk / maxChunk) * 100" *ngIf="!loaded"></mat-progress-bar>
      <div id="image-inside-cont">
        <object type="application/pdf" *ngIf="safeUrl" [data]="safeUrl"></object>
        <!--<iframe referrerpolicy="no-referrer" type="application/pdf" *ngIf="safeUrl" [src]="safeUrl"></iframe>-->
      </div>
      <div id="file-menu" *ngIf="file">
        <span>{{ file.fullName }}</span>
        <div id="actions">
          <button mat-icon-button [disabled]="!loaded">
            <mat-icon (click)="download()">download</mat-icon>
          </button>
        </div>
      </div>
      <div class="error-window" *ngIf="error" translate>Error happened during the download</div>
    </div>
  </div>
</div>
