@inherits ComponentBase

<TableContainer T="HostInterfaceRouteEntity"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Destination" T="HostInterfaceRouteEntity">
                Destination
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Mask" T="HostInterfaceRouteEntity">
                Mask
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Gateway" T="HostInterfaceRouteEntity">
                Gateway
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Metric" T="HostInterfaceRouteEntity">
                Metric
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Interface" T="HostInterfaceRouteEntity">
                Interface
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Destination">
                @context.Destination
            </MudTd>
            <MudTd DataLabel="Mask">
                @context.Mask
            </MudTd>
            <MudTd DataLabel="Gateway">
                @context.Gateway
            </MudTd>
            <MudTd DataLabel="Metric">
                @context.Metric
            </MudTd>
            <MudTd DataLabel="Interface">
                @if (context.Interfaces is not null && context.Interfaces.Any())
                {
                    <MudLink Href="@Navigation.Management.Hosts.Network.Interfaces.DetailsHref(HostId, context.Interface.ToString())" Typo="Typo.inherit" Underline="Underline.None">
                        @context.Interfaces.First().Name
                    </MudLink>
                }
            </MudTd>
    </RowTemplate>
</TableContainer>