@if (ViewMode == GalleryViewMode.Grid)
{
    <MudContainer MaxWidth="MaxWidth.Large" Class="tracks-gallery-container">
        <MudGrid Spacing="6" Justify="Justify.Center">
            @foreach (var track in Tracks)
            {
                <MudItem xs="12" sm="6" md="4" lg="3" xl="3">
                    <div class="deepdrft-track-gallery-item-center">
                        <TrackCard TrackModel="@track"
                                   ViewMode="@ViewMode"
                                   IsPlaying="@(IsPlaying && ActiveTrack?.Id == track.Id)"
                                   IsPaused="@(IsPaused && ActiveTrack?.Id == track.Id)"
                                   OnPlay="@HandlePlayClick"
                                   OnPause="@HandlePauseClick"/>
                    </div>
                </MudItem>
            }
        </MudGrid>
    </MudContainer>
}
else
{
    <MudContainer MaxWidth="MaxWidth.Large">
        <div class="deepdrft-track-list">
            @foreach (var track in Tracks)
            {
                <TrackCard TrackModel="@track"
                           ViewMode="@ViewMode"
                           IsPlaying="@(IsPlaying && ActiveTrack?.Id == track.Id)"
                           IsPaused="@(IsPaused && ActiveTrack?.Id == track.Id)"
                           OnPlay="@HandlePlayClick"
                           OnPause="@HandlePauseClick"/>
            }
        </div>
    </MudContainer>
}
