@inherits LocalizableComponentBase @implements IDisposable @* The question ConfirmService asks before what can't be undone, in MainLayout: a sheet from the bottom on a phone, a dialog in the middle from md. Closing it in any way answers no. *@ @Confirm.Heading @if (Confirm.Text is { Length: > 0 } text) {

@text

}
@Localizer["Cancel"] @Confirm.ConfirmText
@code { [Inject] ConfirmService Confirm { get; set; } protected override void OnInitialized() { Confirm.Changed += Refresh; IsLoading = false; } void Refresh() => InvokeAsync(StateHasChanged); void Closed(bool open) { if (!open) Confirm.Answer(false); } public void Dispose() => Confirm.Changed -= Refresh; }