@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">
                Pool
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Health" T="ViewModel">
                Health
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="States" T="ViewModel">
                Status
            </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="Name">
            <MudLink Href="@Navigation.Management.Hosts.Systems.StoragePools.DetailsHref(context?.Host?.Id, context?.Id?.ToString())" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Name
            </MudLink>
        </MudTd>
        <MudTd DataLabel="Health">
            @{
                var color = context?.Health == "Warning" ? Color.Warning : Color.Error;
                <MudText Color="color" Typo="Typo.inherit">@context?.Health</MudText>
            }
        </MudTd>
        <MudTd DataLabel="States">
            @if (context?.States is not null)
            {
                <MudText Color="Color.Error" Typo="Typo.inherit">@string.Concat(@context.States)</MudText>
            }
        </MudTd>
    </RowTemplate>
</TableContainer>