using PARR.Constants;

namespace PARR.BLL.Services.Interfaces
{
    public delegate IQueryable<DateOnly> GetWeekendsDelegate(DateOnly start, DateOnly end);

    public interface ICalendarService
    {
        /// <summary>
        /// Возвращает список дней между датами
        /// </summary>
        /// <param name="startPeriod"></param>
        /// <param name="endPeriod"></param>
        /// <returns></returns>
        List<DateOnly> GetDatesForPeriod(DateOnly startPeriod, DateOnly endPeriod);

        /// <summary>
        /// Возвращает список дней между датами
        /// </summary>
        /// <param name="startPeriod"></param>
        /// <param name="endPeriod"></param>
        /// <returns></returns>
        List<DateOnly> GetDatesForPeriod(DateTimeOffset startPeriod, DateTimeOffset endPeriod);

        /// <summary>
        /// Получить дату со смещенной часовой зоной
        /// </summary>
        /// <param name="date"></param>
        /// <param name="timeZoneOffsetHours"></param>
        /// <returns></returns>
        DateTimeOffset GetDateWithTimeZoneOffset(DateTimeOffset date, int timeZoneOffsetHours);
        DateOnly GetEndPeriodDate(DateOnly startPeriod, DistributionPeriodTypeEnum periodType, string distributionPeriod);

        /// <summary>
        /// Получить только рабочие дни за период
        /// </summary>
        /// <param name="startPeriod"></param>
        /// <param name="refTime"></param>
        /// <param name="typePeriod"></param>
        /// <param name="distributionPeriod"></param>
        /// <param name="getWeekends"></param>
        /// <returns></returns>
        List<DateOnly> GetWorkDatesForPeriod(DateOnly startPeriod, TimeOnly refTime, DistributionPeriodTypeEnum periodType, string distributionPeriod, GetWeekendsDelegate getWeekends);
    }
}
