using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Assistants.BeyondFactsLab;
///
/// The work states the person confirmed in a preparation of the BeyondFacts Lab, beside the steps.
///
///
/// They are what the lab builds on in the later steps, so the person sees them while working on any step, with the
/// outdated ones marked.
///
public partial class BflConfirmedWorkStates : MSGComponentBase
{
///
/// Gets or sets the work states of the preparation, by their steps.
///
[Parameter, EditorRequired]
public IReadOnlyDictionary WorkStates { get; set; } = new Dictionary();
///
/// Gets or sets the forms of the preparation, by their steps, which tell whether a work state is outdated.
///
[Parameter, EditorRequired]
public IReadOnlyDictionary Forms { get; set; } = new Dictionary();
///
/// Gets or sets further CSS classes of the area.
///
[Parameter]
public string Class { get; set; } = string.Empty;
private IReadOnlyList ConfirmedSteps => [.. BflStep.All.Where(step => this.WorkStates.GetValueOrDefault(step)?.Confirmed is not null)];
}