@inherits ComponentBase

<TableContainer T="ViewModel"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Customer" T="ViewModel">
                Customer
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Host" T="ViewModel">
                Host
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Name" T="ViewModel">
                Volume
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Free" T="ViewModel">
                Free
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Customer">
            <MudLink Href="@Navigation.Management.Customers.DetailsHref(context?.Customer?.Id)" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Customer?.Name
            </MudLink>
        </MudTd>
        <MudTd DataLabel="Host">
            <MudLink Href="@Navigation.Management.Hosts.DetailsHref(context?.Host?.Id)" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Host?.Name
            </MudLink>
        </MudTd>
        @*<MudTd DataLabel="Drive">
            <MudLink Href="@Navigation.Management.Hosts.Hardware.Drives.DetailsHref(context?.Host?.Id, context?.Drive.ToString())" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Drive
            </MudLink>
        </MudTd>*@
        <MudTd DataLabel="Name">
            <MudLink Href="@Navigation.Management.Hosts.Systems.Volumes.DetailsHref(context?.Host?.Id, context?.Id.ToString())" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Name
            </MudLink>
        </MudTd>
        <MudTd DataLabel="Free">
            @{
                if (context?.FreeSpace is not null && context?.PercentFree is not null)
                {
                    @($"{Math.Round((context.FreeSpace.Value / Math.Pow(1024, 3)), 2)} GB ({Math.Round(context.PercentFree.Value, 2)}%)")
                }
            }
        </MudTd>
    </RowTemplate>
</TableContainer>