using ERPCore.Common.Http;
using ERPCore.Domain.Enums;
using ERPCore.Dtos.Common;
using ERPCore.Dtos.Hrm;

namespace ERPCore.Services.Interfaces;

/// <summary>Employee (staff) business logic (docs/13-BACKEND-HRM-API.md §3).</summary>
public interface IEmployeeService
{
    Task<PagedResponse<EmployeeListItemDto>> ListAsync(
        PageQuery query, EmployeeStatus? status, int? departmentId, int? designationId, int? branchId, CancellationToken ct = default);
    Task<ETagged<EmployeeDetailDto>?> GetAsync(int employeeId, CancellationToken ct = default);
    Task<ETagged<EmployeeDetailDto>> CreateAsync(CreateEmployeeRequest request, int actorUserId, CancellationToken ct = default);
    Task<ETagged<EmployeeDetailDto>> UpdateAsync(int employeeId, UpdateEmployeeRequest request, uint expectedRowVersion, int actorUserId, CancellationToken ct = default);
    Task SetStatusAsync(int employeeId, EmployeeStatus status, CancellationToken ct = default);

    Task<List<EmployeeBankDetailDto>> ListBankDetailsAsync(int employeeId, CancellationToken ct = default);
    Task<List<EmployeeBankDetailDto>> ReplaceBankDetailsAsync(int employeeId, ReplaceEmployeeBankDetailsRequest request, CancellationToken ct = default);
}
