using System;
using System.Threading.Tasks;

namespace InABox.Core
{
    public class CoreMenuItem<T> : ICoreMenuItem where T : class
    {
        public string Header { get; set; }
        public T? Image { get; set; }
        public Func<Task<bool>>? Action { get; set; }

        public Func<bool>? IsVisible { get; set; }

        public CoreMenuItem(string header, T? image = null, Func<Task<bool>>? action = null, Func<bool>? isVisible = null)
        {
            Header = header;
            Image = image;
            Action = action;
            IsVisible = isVisible;
        }
    }
}