using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Seenginx.Models;
using System.Threading.Tasks;

namespace Seenginx.Components
{
	public class FileItemBase : ComponentBase
	{
		[Parameter] public ConfigFile File { get; set; }
		[Parameter] public EventCallback<ConfigFile> SelectedFileChanged { get; set; }

		public async Task SelectFile(MouseEventArgs e)
		{
			await SelectedFileChanged.InvokeAsync(File);
		}
	}
}
