@namespace DeepDrftPublic.Client.Controls.AudioPlayerBar



@if (Track is not null)
{
    <div class="track-meta-row">
        <div class="track-meta-identity">
            <a href="@($"/track/{Track.EntryKey}")" style="text-decoration: none;">
                <MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate">
                    @Track.TrackName
                </MudText>
            </a>
            <MudText Typo="Typo.subtitle2" Class="track-meta-sep"> - </MudText>
            <MudText Typo="Typo.caption" Class="track-meta-artist text-truncate">
                @Track.Release?.Artist
            </MudText>
        </div>

        <div class="track-meta-accents">
            @if (!string.IsNullOrEmpty(Track.Release?.Genre))
            {
                <MudChip T="string"
                         Size="Size.Small"
                         Variant="Variant.Outlined"
                         Color="Color.Tertiary"
                         Class="deepdrft-genre-chip">
                    @Track.Release.Genre
                </MudChip>
            }

            @if (Track.Release?.ReleaseDate.HasValue == true)
            {
                <MudText Typo="Typo.caption" Class="track-meta-year">
                    @Track.Release.ReleaseDate.Value.Year
                </MudText>
            }
        </div>
    </div>
}
