@inherits ComponentBase

<TableContainer T="HostDriveEntity"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync">
    <Header>
        <MudTh>
                <MudTableSortLabel SortLabel="Name" T="HostDriveEntity">
                    Name
                </MudTableSortLabel>
            </MudTh>
            <MudTh>
                <MudTableSortLabel SortLabel="Firmware" T="HostDriveEntity">
                    Firmware
                </MudTableSortLabel>
            </MudTh>
            <MudTh>
                <MudTableSortLabel SortLabel="Serial" T="HostDriveEntity">
                    Serial
                </MudTableSortLabel>
            </MudTh>
            <MudTh>
                <MudTableSortLabel SortLabel="Type" T="HostDriveEntity">
                    Type
                </MudTableSortLabel>
            </MudTh>
            <MudTh>
                <MudTableSortLabel SortLabel="Size" T="HostDriveEntity">
                    Capacity
                </MudTableSortLabel>
            </MudTh>
            <MudTh>
                <MudTableSortLabel SortLabel="Status" T="HostDriveEntity">
                    Status
                </MudTableSortLabel>
            </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Name">
            @context?.Name
        </MudTd>
        <MudTd DataLabel="Firmware">
            @context?.Firmware
        </MudTd>
        <MudTd DataLabel="Serial">
            @context?.Serial
        </MudTd>
        <MudTd DataLabel="Type">
            @context?.Type
        </MudTd>
        <MudTd DataLabel="Size">
            @{
                var capacity = "-";

                if (context.Size is not null && context.Size.HasValue)
                {
                    capacity = $"{Math.Round((context.Size.Value / Math.Pow(1024, 3)), 2)} GB";
                }

                @capacity
            }
        </MudTd>
        <MudTd DataLabel="Status">
            @{
                var color = context?.Status == "OK" ? Color.Success : Color.Error;
                <MudText Color="color" Typo="Typo.inherit">@context?.Status</MudText>
            }
        </MudTd>
    </RowTemplate>
</TableContainer>