<div class="sort-header">
    <span class="label" trans>Sort by</span>
    <button class="no-style" [matMenuTriggerFor]="menu" [disabled]="(activePage$ | async)?.disableSort">
        <span class="sort-button-content">
            <span>{{getSortViewName(sortColumn$ | async) | trans}}</span>
            <mat-icon svgIcon="keyboard-arrow-down" class="arrow-icon"></mat-icon>
        </span>
        <mat-icon svgIcon="sort" class="mobile-sort-button-content"></mat-icon>
    </button>
    <mat-menu #menu="matMenu" class="drive-sort-menu">
        <div class="title" trans>Direction</div>
        <button mat-menu-item (click)="changeDirection('asc')" [class.active]="directionIsActive('asc')">
            <mat-icon svgIcon="check"></mat-icon>
            <span trans>Ascending</span>
        </button>
        <button mat-menu-item (click)="changeDirection('desc')" [class.active]="directionIsActive('desc')">
            <mat-icon svgIcon="check"></mat-icon>
            <span trans>Descending</span>
        </button>
        <div class="separator"></div>
        <div class="title" trans>Sort By</div>
        <button mat-menu-item *ngFor="let sort of availableSorts" (click)="changeSort(sort)" [class.active]="sortIsActive(sort)">
            <mat-icon svgIcon="check"></mat-icon>
            <span trans>{{sort.viewName}}</span>
        </button>
    </mat-menu>
</div>
<toolbar-actions></toolbar-actions>