@inherits ComponentBase

<TableContainer T="HostSysUserEntity"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Name" T="HostSysUserEntity">
                Name
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="FullName" T="HostSysUserEntity">
                Full Name
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Sid" T="HostSysUserEntity">
                SID
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Lockout" T="HostSysUserEntity">
                Lockout
            </MudTableSortLabel>
        </MudTh>
        @*<MudTh>
        <MudTableSortLabel SortLabel="Groups" T="HostUserEntity">
        Groups
        </MudTableSortLabel>
        </MudTh>*@
        <MudTh>
            <MudTableSortLabel SortLabel="Status" T="HostSysUserEntity">
                Status
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Name">
            <MudLink Href="@Navigation.Management.Hosts.Systems.Users.DetailsHref(HostId, context?.Id.ToString())" Typo="Typo.inherit" Underline="Underline.None">
                @if (context?.LocalAccount is not null && context.LocalAccount is true)
                {
                    @context?.Name
                }
                else
                {
                    @($@"{context?.Domain}\{context?.Name}")
                }
            </MudLink>
        </MudTd>
        <MudTd DataLabel="FullName">
            @context?.FullName
        </MudTd>
        <MudTd DataLabel="Sid">
            @context?.Sid
        </MudTd>
        <MudTd DataLabel="Lockout">
            <MudCheckBox Checked="@context?.Lockout" Disabled DisableRipple />
        </MudTd>
        @*<MudTd DataLabel="Groups">
        <MudLink Href="@Navigation.Management.Hosts.Users.Groups.IndexHref(Id, context?.DocumentId.ToString())" Typo="Typo.inherit" Underline="Underline.None">
        @context?.Groups?.Count
        </MudLink>
        </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>