import {scopedEndpoint} from '@/shared/services/httpClient';
import type {Endpoint, Scope} from '@/shared/services/httpClient';
import type {
  AttendancePoint,
  StaffMember,
  StaffSummary,
} from '@/features/staff/types/staff';

/** Staff endpoints. See dashboardRepository for the layer's contract. */
export const staffRepository = {
  list: (scope: Scope): Endpoint<StaffMember[]> =>
    scopedEndpoint('/api/staff', scope),

  summary: (scope: Scope): Endpoint<StaffSummary> =>
    scopedEndpoint('/api/staff/summary', scope),

  attendance: (scope: Scope): Endpoint<AttendancePoint[]> =>
    scopedEndpoint('/api/staff/attendance', scope),
};
