package com.axelor.apps.hr.service;

import com.axelor.apps.hr.db.Absence;
import com.axelor.apps.hr.db.DailyReport;
import com.google.inject.persist.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

public interface AbsenceService {

  @Transactional
  void attachTheAbsenceWithDailyReport(Absence absence, List<DailyReport> dailyreports);

  @Transactional
  void deAttachTheAbsenceWithDailyReport(
      Absence absence, List<DailyReport> dailyreports, Boolean archive);

  @Transactional
  void chooseAbsenceType(Absence absence, Integer selectedType);

  @Transactional
  BigDecimal calculateTotalAbsenceHours(
      LocalDateTime absenceStartDate, LocalDateTime absenceEndDate);

  BigDecimal calculateTotalAbsenceMinutes(
      LocalDateTime absenceStartDate, LocalDateTime absenceEndDate);
}
