@inherits ComponentBase

@using Vaitr.Scheduler;

<BaseContainer Title="@Title" Breadcrumbs="@Breadcrumbs" LoadData="LoadDataAsync">
    <Content>
        @if (Job is not null)
        {
            <MudGrid>
                <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="string" Key="Name" Value="@Job.Name" />
                </MudItem>
                <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="TaskState" Key="State" Value="@Job.State" />
                </MudItem>
                <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="TimeSpan?" Key="Timeout" Value="@Job.Timeout" />
                </MudItem>
                <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="DateTime?" Key="Executed" Value="@Job.Executed" />
                </MudItem>
                <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="string" Key="Status" Value="@(Job.Disabled ? "Disabled" : "Enabled")" ValueColor="@(Job.Disabled ? Color.Error : Color.Success)" />
                </MudItem>
                @* <MudItem xs="12" sm="6" md="6" lg="3">
                    <KeyValueCard T="int" Href="@Navigation.Management.Jobs.HostsHref(JobId)" Key="Hosts" Value="@(Job?.Hosts?.Count() ?? 0)" Icon="@Icons.Material.Outlined.Devices" IconColor="Color.Primary" />
                </MudItem> *@
            </MudGrid>
        }
    </Content>
</BaseContainer>