/**
 * Staff, attendance and performance contracts.
 *
 * The wire shape for this feature. Imported by BOTH its route handlers and its
 * components, so a server/client drift is a type error rather than a runtime
 * surprise. When a real backend arrives, this file is the negotiation artifact.
 */

export type Attendance = 'present' | 'absent' | 'late' | 'leave';

export interface StaffMember {
  id: string;
  name: string;
  avatarUrl: string | null;
  /** Which store they are rostered at. */
  storeId: string;
  role: string;
  attendance: Attendance;
  salesCount: number;
  rewardsIssued: number;
  /** 0–100. */
  performanceScore: number;
  /** Share of shifts attended on time, over the selected period. */
  punctualityPct: number;
}

export interface StaffSummary {
  present: number;
  absent: number;
  late: number;
  onLeave: number;
  total: number;
}

export interface AttendancePoint {
  t: string;
  present: number;
  late: number;
  absent: number;
}

export interface StaffSalesPoint {
  t: string;
  sales: number;
}
