using Employees;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

namespace UI.Employee
{
    public class EmployeeHireDetails : EmployeeDetails
    {
        [Header("Hire Worker Settings")]
        [SerializeField] private Button hireButton;

        public void Init(EmployeeData data, Sprite sp, UnityAction onReleaseCallback, UnityAction onHireCallback)
        {
            base.Init(data, sp, onReleaseCallback);

            hireButton.onClick.RemoveAllListeners();
            hireButton.onClick.AddListener(() => onHireCallback?.Invoke());
        }
    }
}