namespace NetinaShop.AdminPanel.PWA.Utilities.Models;

public static class DialogUtility
{
    public static async Task<IDialogReference> ShowQuestionDialog(this IDialogService dialogService, string question)
    {
        var options = new DialogOptions { MaxWidth = MaxWidth.Small, FullWidth = true,NoHeader = true, CloseOnEscapeKey = true };
        var parameters = new DialogParameters<QuestionDialog>();
        parameters.Add(x => x.ContentText, question);
        var dialogReference = await dialogService.ShowAsync<QuestionDialog>(string.Empty, parameters, options);
        return dialogReference;
    }
}