using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Dialogs;
///
/// A dialog that informs the user about something without asking for a decision. Use it when a
/// message must not be missed, e.g., when an action was refused.
///
public partial class InformationDialog : MSGComponentBase
{
[CascadingParameter]
private IMudDialogInstance MudDialog { get; set; } = null!;
///
/// The message shown to the user.
///
[Parameter]
public string Message { get; set; } = string.Empty;
///
/// The icon shown next to the message.
///
[Parameter]
public string Icon { get; set; } = Icons.Material.Filled.Info;
///
/// The color of the icon.
///
[Parameter]
public Color IconColor { get; set; } = Color.Info;
private void Close() => this.MudDialog.Close(DialogResult.Ok(true));
}