<MudDialog>
    <DialogContent>
        <MudText>@Content</MudText>
    </DialogContent>
    <DialogActions>
        <MudButton Class="m-2" OnClick="Cancel" Variant="Variant.Filled">@CancelText</MudButton>
        <MudButton Class="m-2" Color="@Color" Variant="Variant.Filled" OnClick="Submit">@ConfirmText</MudButton>
    </DialogActions>
</MudDialog>

@code {
    [CascadingParameter]
    private IMudDialogInstance? MudDialog { get; set; }

    [Parameter]
    public string? Title { get; set; }

    [Parameter]
    public string? Content { get; set; }

    [Parameter]
    public string? ConfirmText { get; set; }

    [Parameter]
    public string? CancelText { get; set; } = "Cancel";

    [Parameter]
    public Color Color { get; set; }

    private void Submit() => MudDialog?.Close(DialogResult.Ok(true));

    private void Cancel() => MudDialog?.Cancel();
}
