@code {
    [Parameter, Required] public string FileName { get; set; }
}


@if (FileName != null)
{
    var ex = Path.GetExtension(FileName?.ToLower());
    <span class="badge bg-secondary">
        @switch (ex)
        {
            case ".flac":
                <i class="bi bi-file-earmark-music"></i>
                break;
            case ".wav":
                <i class="bi bi-filetype-wav"></i>
                break;
            case ".m4a":
            case ".aac":
                <i class="bi bi-filetype-aac"></i>
                break;
            case ".mp3":
                <i class="bi bi-filetype-mp3"></i>
                break;
            case ".mp4":
                <i class="bi bi-filetype-mp4"></i>
                break;
            default:
                <i class="bi bi-file-earmark"></i>
                break;
        }
        @ex.Substring(1).ToUpper()
    </span>
}
