@inherits ComponentBase

<TableContainer T="TaskEntity"
                @ref="Container"
                @bind-Search="Search"
                Title="@Title"
                Breadcrumbs="@Breadcrumbs"
                Data="LoadDataAsync"
                OnAdd="OnAdd">
    <Header>
        <MudTh>
            <MudTableSortLabel SortLabel="Name" T="TaskEntity">
                Name
            </MudTableSortLabel>
        </MudTh>
        <MudTh>
            <MudTableSortLabel SortLabel="Description" T="TaskEntity">
                Description
            </MudTableSortLabel>
        </MudTh>
    </Header>
    <RowTemplate>
        <MudTd DataLabel="Name">
            <MudLink Href="@Navigation.Management.Scheduler.Tasks.DetailsHref(context.Id)" Typo="Typo.inherit" Underline="Underline.None">
                @context?.Name
            </MudLink>
        </MudTd>
        <MudTd DataLabel="Description">
            @context?.Description
        </MudTd>
    </RowTemplate>
    <ActionTemplate>
        <MudMenuItem OnClick="@(()=>OnUnassign(context))">
            Unassign
        </MudMenuItem>
    </ActionTemplate>
</TableContainer>

<ActionDialog @bind-Visible="Unassign">
    <Content>
        <MudTextField T="string" @bind-Value="Model.Name" Label="Name" Variant="Variant.Text" Margin="Margin.Dense" ReadOnly />
         <MudTextField T="string" @bind-Value="Model.Description" Label="Description" Variant="Variant.Text" Margin="Margin.Dense" ReadOnly />
     </Content>
     <Actions>
         <MudButton OnClick="()=>Unassign = false">
             Cancel
         </MudButton>
         <MudButton OnClick="OnUnassignSubmitAsync" Color="Color.Secondary">
             Unassign
         </MudButton>
     </Actions>
</ActionDialog>