@inherits FnzComponentBase

@code {
    [Parameter, Required] public FeTrack Track { get; set; }
    [Parameter] public EventCallback RemoveClick { get; set; } = EventCallback.Empty;
    private DiscDialog dlgDisc;
}

<tr class="mouse-hilight">
    <td colspan="2" style="width:0">
        <img src="@Track.Disc.CoverPath" style="height:50px" @onclick="()=>dlgDisc.Show(Track.Disc)" />
        <DiscDialog @ref="dlgDisc"></DiscDialog>
    </td>
    <td class="align-middle" style="width:250px">
        <FileIcon Track="@Track" ShowParam="true"></FileIcon>
    </td>
    <td class="align-middle w-100">
        <div class="text-nowrap">@Track.GetTitleOrFilename()</div>
        <div class="text-nowrap text-muted"> @Track.Tag?.Artist</div>
    </td>
    <td class="text-center" colspan="3">
        <div class="text-nowrap">@Track.Tag?.Duration.SecondToDur()</div>
        <div class="text-nowrap text-muted"> @Track.Tag?.Length.BytesToFileSize()</div>
    </td>
    <td>
        <div class="dropstart">
            <button type="button" class="btn btn-danger p-2" data-bs-toggle="dropdown">
                <i class="bi bi-folder-minus"></i>
            </button>
            <ul class="dropdown-menu mx-2">
                <li><button class="dropdown-item text-danger" @onclick="()=>RemoveClick.InvokeAsync()">Confirm Remove</button></li>
            </ul>
        </div>
    </td>
</tr>