using AIStudio.Chat;
using AIStudio.Chat.Embedded;
using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Assistants.ModelComparison;
///
/// The decision on a task of a comparison series: both chats side by side, read-only and without the names of the
/// models, and the buttons of the vote.
///
///
/// The chats keep their places, the first chat on the left: the order in which the user met the models was drawn at
/// random already, see ModelComparisonSeriesTask.FirstModelIsChatOne, and a vote names a chat, not a model. The chats
/// stand side by side on wide windows and below each other on narrow ones, so that long answers stay readable, each
/// with its button below it, as the answers in the mode Answer Variance, see ModelComparisonVoteColumns.
///
public partial class ModelComparisonSeriesDecision : MSGComponentBase
{
private const Tools.Components COMPONENT = Tools.Components.MODEL_COMPARISON_ASSISTANT;
///
/// Gets or sets where the chats of the series live.
///
[Parameter, EditorRequired]
public IEmbeddedChatStore Store { get; set; } = null!;
///
/// Gets or sets the task.
///
[Parameter, EditorRequired]
public ModelComparisonSeriesTask SeriesTask { get; set; } = null!;
///
/// Gets or sets how a chat of the series starts, for a chat which has no stored thread.
///
[Parameter, EditorRequired]
public Func CreateThread { get; set; } = () => new();
///
/// Gets or sets whether the series is being saved right now, which holds the vote back.
///
[Parameter]
public bool IsSaving { get; set; }
///
/// Gets or sets what happens when the user votes: COLUMN_A names the first chat, COLUMN_B the second one.
///
[Parameter]
public EventCallback Vote { get; set; }
}