Files
AI-Studio/app/MindWork AI Studio/Components/AssistantModeSwitch.razor.cs
T

32 lines
997 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
/// <summary>
/// The button next to the settings of an assistant, which switches to another of the modes it offers, e.g., from
/// translating a document to translating a text.
/// </summary>
/// <remarks>
/// Every assistant with modes shows the same icon here, so that users recognize the button; its tooltip names
/// where it leads.
/// </remarks>
public partial class AssistantModeSwitch : ComponentBase
{
/// <summary>
/// The tooltip of the button, e.g., "Switch to text translation".
/// </summary>
[Parameter, EditorRequired]
public string Tooltip { get; set; } = string.Empty;
/// <summary>
/// Whether the button is disabled, e.g., while the assistant works.
/// </summary>
[Parameter]
public bool Disabled { get; set; }
/// <summary>
/// Called when the user clicks the button.
/// </summary>
[Parameter]
public EventCallback OnSwitch { get; set; }
}