using ERPCore.Domain.Entities;

namespace ERPCore.Services.Interfaces;

/// <summary>
/// Pure attendance-figure computation against a <see cref="WorkShift"/> baseline
/// (docs/12-BACKEND-HRM.md A.3) — the direct analog of
/// <see cref="Services.Stock.IFifoCostingService"/>: invoked from
/// <see cref="IAttendanceUploadService"/>, never from a controller.
/// </summary>
public interface IAttendanceComputationService
{
    /// <summary>
    /// Computes WorkingMinutes/LateMinutes/EarlyLeaveMinutes/OvertimeMinutes and the
    /// derived AttendanceStatus for one record's CheckIn/CheckOut against its shift,
    /// mutating the record in place.
    /// </summary>
    void Compute(AttendanceRecord record, WorkShift shift, bool hasApprovedLeave, bool isHoliday, bool isWeekOff);
}
