using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Assistants.ModelComparison;
///
/// The current run of a batch, while the user votes: both answers without the names of the models, in random columns,
/// and the buttons of the vote. A run in which a model did not answer offers only to move on.
///
public partial class ModelComparisonVoting : MSGComponentBase
{
///
/// Gets or sets the batch.
///
[Parameter, EditorRequired]
public ModelComparisonBatch Batch { get; set; } = null!;
///
/// Gets or sets the current run of the batch.
///
[Parameter, EditorRequired]
public ModelComparisonBatchEntry Entry { get; set; } = null!;
///
/// Gets or sets what happens when the user votes.
///
[Parameter]
public EventCallback Vote { get; set; }
///
/// Gets or sets what happens when the user skips the vote on this run.
///
[Parameter]
public EventCallback SkipThisRun { get; set; }
///
/// Gets or sets what happens when the user skips the votes on all remaining runs.
///
[Parameter]
public EventCallback SkipRemainingVotes { get; set; }
///
/// Gets or sets what happens when the user moves past a run which has nothing to vote on.
///
[Parameter]
public EventCallback NextEntry { get; set; }
private string Heading => this.Batch.RunCount > 1
? string.Format(ModelComparisonFormat.Culture, T("Run {0} of {1}"), this.Batch.CurrentIndex + 1, this.Batch.RunCount)
: T("Answers");
}