using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
///
/// Shows one card per mode with which an assistant can start, and reports the mode the user chose.
///
///
/// The assistant shows nothing else until the user chose, so the texts of the options come from the assistant: they
/// tell what it does in each mode. Generic, so that every assistant names its modes with an enum of its own.
///
/// The type of the modes of the assistant.
public partial class AssistantModeChoice : ComponentBase
{
///
/// The options to choose from, in the order the cards show them.
///
[Parameter]
public IReadOnlyList> Options { get; set; } = [];
///
/// Called with the mode of the option the user chose.
///
[Parameter]
public EventCallback ModeChosen { get; set; }
private async Task Choose(AssistantModeOption option) => await this.ModeChosen.InvokeAsync(option.Mode);
}