using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Dialogs;
///
/// A confirmation dialog that can be used to ask the user for confirmation.
///
public partial class ConfirmDialog : MSGComponentBase
{
[CascadingParameter]
private IMudDialogInstance MudDialog { get; set; } = null!;
[Parameter]
public string Message { get; set; } = string.Empty;
///
/// Optional Markdown content rendered instead of using the message property.
///
[Parameter]
public string MarkdownBody { get; set; } = string.Empty;
private void Cancel() => this.MudDialog.Cancel();
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(true));
}