using Blazorise;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Seenginx.Components
{
	public class GeneralNotificationModalBase : ComponentBase
	{
		[Parameter]
		public Modal ModalReference { get; set; }
		[Parameter]
		public GeneralNotificationSettings NotificationSettings { get; set; }

		public void ShowGeneralNotificationModal(string titleClass, string title, string text, Color color)
		{
			NotificationSettings.TitleClass = titleClass;
			NotificationSettings.Title = title;
			NotificationSettings.Text = text;
			NotificationSettings.ButtonColor = color;
			ModalReference.Show();
		}

		public void HideGeneralNotificationModal()
		{
			ModalReference.Hide();
			NotificationSettings.TitleClass = null;
			NotificationSettings.Title = null;
			NotificationSettings.Text = null;
			NotificationSettings.ButtonColor = Color.None;
		}

	}

	public class GeneralNotificationSettings
	{
		public string TitleClass { get; set; }
		public string Title { get; set; }
		public string Text { get; set; }
		public Color ButtonColor { get; set; }
	}
}
