using System;
using Microsoft.AspNetCore.Components;

namespace BlazorServerProject.Components
{
    public class ToastService
    {
        public event Action<ToastOptions> ToastInstance;

        public void Open(ToastOptions options)
        {
            // Invoke ToastComponent to update and show the toast with messages
            this.ToastInstance.Invoke(options);
        }
    }
}