using DepartmentContract.BindingModels;
using DepartmentContract.Logics.IGenericEntityLogic;
using DepartmentContract.ViewModels;
using System;
using System.Collections.Generic;
using ToolsDesktop.Controls;
using ToolsDesktop.Enums;
using ToolsDesktop.Interfaces;
using ToolsDesktop.Models;
using ToolsModule.ManagmentSecurity;

namespace DepartmentWindowsDesktop.EntityControls
{
    /// <summary>
    /// Реализация контрола для списка сотрудников
    /// </summary>
    public partial class ControlEmployeeList :
		GenericControlEntityList<EmployeeGetBindingModel, EmployeeSetBindingModel, EmployeeListViewModel, EmployeeViewModel, IEmployeeLogic>,
		IGenericControlEntityList
	{
		public ControlEmployeeList()
		{
			InitializeComponent();
			Title = "Сотрудники";
			ControlId = new Guid("22806450-62ad-479f-8ee7-dc1d9a90b6cf");
			AccessOperation = AccessOperation.Сотрудники;
			ControlViewEntityElement = new ControlEmployeeElement();
			_genericControlViewEntityList = this;
		}

		public IControl GetInstanceGenericControl() => new ControlEmployeeList() { ControlId = Guid.NewGuid() };

		public ControlViewEntityListConfiguration GetConfigControl() => new()
		{
			PaginationOn = false,
			HideToolStripButton = new List<ToolStripButtonListNames>
			{
				ToolStripButtonListNames.toolStripButtonSearch
			}
		};
	}
}