<os-head-bar [nav]="false" [goBack]="true">
    <!-- Title -->
    <div class="title-slot"><h2 translate>Upload files</h2></div>

    <!-- Menu -->
    <div class="menu-slot">
        <button type="button" mat-icon-button [matMenuTriggerFor]="uploadMenu">
            <mat-icon>more_vert</mat-icon>
        </button>
    </div>
</os-head-bar>

<mat-card class="os-card">
    <os-media-upload-content
        [parallel]="parallel"
        [directoryId]="directoryId"
        (uploadSuccessEvent)="uploadSuccess()"
        (errorEvent)="showError($event)"
    ></os-media-upload-content>
</mat-card>

<mat-menu #uploadMenu="matMenu">
    <!-- Select upload strategy -->
    <button mat-menu-item (click)="setUploadStrategy(!parallel)">
        <mat-icon color="accent">{{ parallel ? 'check_box' : 'check_box_outline_blank' }}</mat-icon>
        <span translate>Parallel upload</span>
    </button>
</mat-menu>
