using DevExpress.Blazor; using DevExpress.Blazor.Internal; namespace FruitBankHybrid.Shared.Extensions; public static class DevextremeComponentExtension { public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle) { var messageBoxOptions = CreateMessageBoxOptions(title, text, messageBoxRenderStyle); await messageBox.AlertAsync(messageBoxOptions); } public static async Task ShowConfirmBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle) { var messageBoxOptions = CreateMessageBoxOptions(title, text, messageBoxRenderStyle); return await messageBox.ConfirmAsync(messageBoxOptions); } private static MessageBoxOptions CreateMessageBoxOptions(string title, string text, MessageBoxRenderStyle messageBoxRenderStyle) { var messageBoxOptions = new MessageBoxOptions { Title = title, Text = text, RenderStyle = messageBoxRenderStyle, ShowIcon = false }; return messageBoxOptions; } }