{"version":3,"sources":["../src/types/activityDetails.ts"],"sourcesContent":["/**\n * Activity Details Types\n * Types and helper functions for activity details components\n */\n\nimport { z } from 'zod';\n\n/**\n * Student activity status enum\n */\nexport const STUDENT_ACTIVITY_STATUS = {\n  CONCLUIDO: 'CONCLUIDO',\n  AGUARDANDO_CORRECAO: 'AGUARDANDO_CORRECAO',\n  AGUARDANDO_RESPOSTA: 'AGUARDANDO_RESPOSTA',\n  NAO_ENTREGUE: 'NAO_ENTREGUE',\n  /** Physical test (presencial): student hasn't submitted the answer sheet yet */\n  AWAITING_ANSWER_SHEET: 'AGUARDANDO_GABARITO',\n  /** Physical test (presencial): answer sheet has been received and processed */\n  ANSWER_SHEET_RECEIVED: 'GABARITO_RECEBIDO',\n} as const;\n\nexport type StudentActivityStatus =\n  (typeof STUDENT_ACTIVITY_STATUS)[keyof typeof STUDENT_ACTIVITY_STATUS];\n\n/**\n * Zod schema for student activity status\n */\nexport const studentActivityStatusSchema = z.enum([\n  STUDENT_ACTIVITY_STATUS.CONCLUIDO,\n  STUDENT_ACTIVITY_STATUS.AGUARDANDO_CORRECAO,\n  STUDENT_ACTIVITY_STATUS.AGUARDANDO_RESPOSTA,\n  STUDENT_ACTIVITY_STATUS.NAO_ENTREGUE,\n  STUDENT_ACTIVITY_STATUS.AWAITING_ANSWER_SHEET,\n  STUDENT_ACTIVITY_STATUS.ANSWER_SHEET_RECEIVED,\n]);\n\n/**\n * Student data interface\n */\nexport interface ActivityStudentData {\n  studentId: string;\n  studentName: string;\n  answeredAt: string | null;\n  timeSpent: number;\n  score: number | null;\n  status: StudentActivityStatus;\n}\n\n/**\n * Pagination interface\n */\nexport interface Pagination {\n  total: number;\n  page: number;\n  limit: number;\n  totalPages: number;\n  hasNext?: boolean;\n  hasPrev?: boolean;\n}\n\n/**\n * General statistics interface\n */\nexport interface GeneralStats {\n  averageScore: number;\n  completionPercentage: number;\n}\n\n/**\n * Question statistics interface\n */\nexport interface QuestionStats {\n  mostCorrect: number[];\n  mostIncorrect: number[];\n  notAnswered: number[];\n}\n\n/**\n * Activity metadata interface\n */\nexport interface ActivityMetadata {\n  id: string;\n  title: string;\n  type?: string;\n  subtype?: string;\n  isDigital?: boolean | null;\n  startDate: string | null;\n  finalDate: string | null;\n  schoolName: string;\n  year: string;\n  subjectName: string;\n  className: string;\n}\n\n/**\n * Activity details data interface\n */\nexport interface ActivityDetailsData {\n  activity?: ActivityMetadata;\n  students: ActivityStudentData[];\n  pagination: Pagination;\n  generalStats: GeneralStats;\n  questionStats: QuestionStats;\n}\n\n/**\n * Activity details query params interface\n */\nexport interface ActivityDetailsQueryParams {\n  page?: number;\n  limit?: number;\n  sortBy?: 'name' | 'score' | 'answeredAt';\n  sortOrder?: 'asc' | 'desc';\n  status?: StudentActivityStatus;\n}\n\n/**\n * Activity student table item interface\n */\nexport interface ActivityStudentTableItem extends Record<string, unknown> {\n  id: string;\n  studentId: string;\n  studentName: string;\n  status: StudentActivityStatus;\n  answeredAt: string | null;\n  timeSpent: number;\n  score: number | null;\n}\n\n/**\n * Status badge configuration interface\n */\nexport interface StatusBadgeConfig {\n  label: string;\n  bgColor: string;\n  textColor: string;\n}\n\n/**\n * Activity availability status enum\n * Used to determine if an activity is available based on start/end dates\n */\nexport const ACTIVITY_AVAILABILITY = {\n  DISPONIVEL: 'DISPONIVEL',\n  NAO_INICIADA: 'NAO_INICIADA',\n  EXPIRADA: 'EXPIRADA',\n} as const;\n\nexport type ActivityAvailability =\n  (typeof ACTIVITY_AVAILABILITY)[keyof typeof ACTIVITY_AVAILABILITY];\n\n/**\n * Quiz API response\n */\nexport interface QuizResponse {\n  message: string;\n  data: ActivityMetadata;\n}\n\n/**\n * Activity details API response (without activity)\n */\nexport interface ActivityDetailsApiResponse {\n  message: string;\n  data: Omit<ActivityDetailsData, 'activity'>;\n}\n\n/**\n * Presigned URL response\n */\nexport interface PresignedUrlResponse {\n  data: {\n    signedUrl: string;\n    publicUrl: string;\n  };\n}\n"],"mappings":";AAKA,SAAS,SAAS;AAKX,IAAM,0BAA0B;AAAA,EACrC,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,cAAc;AAAA;AAAA,EAEd,uBAAuB;AAAA;AAAA,EAEvB,uBAAuB;AACzB;AAQO,IAAM,8BAA8B,EAAE,KAAK;AAAA,EAChD,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,wBAAwB;AAC1B,CAAC;AA4GM,IAAM,wBAAwB;AAAA,EACnC,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AACZ;","names":[]}