@inherits ComponentBase

<TableContainer T="HostUpdateEntity"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Name" T="HostUpdateEntity">
                Name
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Downloaded" T="HostUpdateEntity">
                Downloaded
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="RequestAction" T="HostUpdateEntity">
                Action
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Reboot" T="HostUpdateEntity">
                Reboot
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Date" T="HostUpdateEntity">
                Date
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Name">
            <MudLink OnClick="()=>OnDescription(context)">@context?.Name</MudLink>
        </MudTd>
        <MudTd DataLabel="Downloaded">
            <MudCheckBox @bind-Checked="@context.IsDownloaded" Disabled DisableRipple />
        </MudTd>
        <MudTd DataLabel="RequestAction">
            <MudCheckBox @bind-Checked="@context.CanRequestUserInput" Disabled DisableRipple />
        </MudTd>
        <MudTd DataLabel="Reboot">
            @context?.RebootBehavior
        </MudTd>
        <MudTd DataLabel="Date">
            @context?.Date?.ToLocalTime()
        </MudTd>
    </RowTemplate>
</TableContainer>

<CascadingValue Name="Model" Value="@Selected">
    <DetailsDialog @ref="_detailsDialog" />
</CascadingValue>

@code {
    private DetailsDialog? _detailsDialog;
}