using MatBlazor; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace CaritasPWA.Shared.Services { public class Toaster { private readonly IMatToaster matToaster; public Toaster(IMatToaster toaster) { this.matToaster = toaster; } public void ShowInfo(string title, string message, string icon = "") { matToaster.Add(message, MatBlazor.MatToastType.Info, title, icon); } public void ShowWarning(string title, string message, string icon = "") { matToaster.Add(message, MatBlazor.MatToastType.Warning, title, icon); } public void ShowError(string title, string message, string icon = "") { matToaster.Add(message, MatBlazor.MatToastType.Danger, title, icon); } } }