import type { ZoneColor } from '@/shared/types/app';

/**
 * Daily Zone check-in (Workstream 16). "Today" is the caller's campus-local date
 * (computed server-side from the campus timezone), so the client never decides
 * the date — it reads `isCheckedInToday` from the backend.
 */
export interface ZoneCheckinTodayDto {
  readonly date: string;
  readonly zone: ZoneColor | null;
  readonly isCheckedInToday: boolean;
}

export interface ZoneCheckinHistoryEntryDto {
  readonly date: string;
  readonly zone: ZoneColor;
}

export interface ZoneCheckinCompletionSummaryDto {
  readonly totalStaff: number;
  readonly completedCount: number;
  readonly pendingCount: number;
  readonly greenCount: number;
  readonly nonGreenCount: number;
  readonly completionRate: number;
}

export interface ZoneCheckinCompletionRowDto {
  readonly userId: string;
  readonly name: string;
  readonly email: string | null;
  readonly avatar: string | null;
  readonly tenantName: string | null;
  readonly tenantLogo: string | null;
  readonly role: string | null;
  readonly date: string;
  readonly status: 'complete' | 'pending';
  readonly zone: ZoneColor | null;
  readonly riskLevel: 'none' | 'medium' | 'pending';
  readonly result: string;
}

export interface ZoneCheckinCompletionDto {
  readonly summary: ZoneCheckinCompletionSummaryDto;
  readonly rows: readonly ZoneCheckinCompletionRowDto[];
}
