using HRM.BO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HRM.UI.DTOs.Leave
{
    public class LeaveDto
    {
        #region Properties

        public string Code { get; set; }
        public string Description { get; set; }
        public bool RemarksNeeded { get; set; }
        public bool DependsOnHoliday { get; set; }
        public EnumGender ApplicableFor { get; set; }

        public bool IsGenderMatch(Employee oEmployee)
        {
            if (this.ApplicableFor == oEmployee.Gender ||
                this.ApplicableFor == EnumGender.Other)
                return true;
            else return false;
        }

        public bool IsBalanceCalculationNeeded { get; set; }
        public bool IsEarnedLeave { get; set; }
        public bool IsAttachmentNeeded { get; set; }
        public bool AutoLeaveReason { get; set; }
        private bool _isHalfLeave = false;

        public bool IsHalfDayLeave
        {
            get { return _isHalfLeave; }
            set { _isHalfLeave = value; }
        }

        private bool _isCompensatoryLeave = false;

        public bool IsCompensatoryLeave
        {
            get { return _isCompensatoryLeave; }
            set { _isCompensatoryLeave = value; }
        }

        public int PayrollTypeID { get; set; }
        public EnumStatus Status { get; set; }

        #endregion
    }

    public enum EnumStatus : short
    {
        Regardless = 0,
        Active = 1,
        Inactive = 2
    }
}