namespace HistoryView.Helper;

public class MessageBoxHelper(IDialogService dialogService)
{
    public async Task<IDialogResult> ShowAsync(string message, MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None)
    {
        IDialogParameters dialogParameters = new DialogParameters
        {
            { "Message", message },
            { "Button", button},
            { "Icon", icon}
        };

        return await dialogService.ShowDialogAsync("MessageBox", dialogParameters);
    }

    public void Show(string message, MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None)
    {
        IDialogParameters dialogParameters = new DialogParameters
        {
            { "Message", message },
            { "Button", button},
            { "Icon", icon}
        };

        dialogService.ShowDialog("MessageBox", dialogParameters);
    }
}