@inherits ComponentBase

<TableContainer T="ViewModel"
    @ref="_container"
    @bind-Search="_search"
    Title="@_title"
    Breadcrumbs="@_breadcrumbs"
    Data="LoadDataAsync"
    OnAdd="()=>NavigationManager.NavigateTo(Navigation.Management.HostGroups.HostsAssignHref(GroupId))">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Customer" T="ViewModel">
                Customer
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Host" T="ViewModel">
                Host
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Customer">
            <MudLink Href="@Navigation.Management.Customers.DetailsHref(@context?.Customers?.Id)" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Customers?.Name
            </MudLink>
        </MudTd>
        <MudTd DataLabel="Host">
            <MudLink Href="@Navigation.Management.Hosts.DetailsHref(@context?.Hosts?.Id)" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Hosts?.Name
            </MudLink>
        </MudTd>
    </RowTemplate>
    <ActionTemplate>
        <MudMenuItem OnClick="@(()=>OnUnassignAsync(context.Hosts.Id))">
            Unassign
        </MudMenuItem>
    </ActionTemplate>
</TableContainer>