export type UserRole =
  | 'super_admin'
  | 'system_admin'
  | 'owner'
  | 'superintendent'
  | 'director'
  | 'office_manager'
  | 'teacher'
  | 'support_staff'
  | 'student'
  | 'guardian'
  | 'guest';

export type CampusId = string;

export interface CampusInfo {
  readonly id: CampusId;
  readonly mascot: string;
  readonly fullName: string;
  readonly color: string;
  readonly bgGradient: string;
  readonly borderColor: string;
  readonly textColor: string;
  readonly bgLight: string;
  readonly description: string;
  readonly isOnline?: boolean;
}

export interface User {
  readonly name: string;
  readonly role: UserRole;
  readonly avatar: string;
  readonly campus: string;
}

export interface StaffProfile {
  readonly id: string;
  readonly full_name: string;
  readonly role: UserRole;
  readonly campus: string;
  readonly avatar_url: string | null;
  readonly personality_type?: string | null;
  readonly created_at?: string;
  readonly updated_at?: string;
}

export interface FrameEntry {
  readonly id: string;
  readonly weekOf: string;
  readonly postedDate: string;
  readonly formal: string;
  readonly recognition: string;
  readonly application: string;
  readonly management: string;
  readonly emotional: string;
  readonly author: string;
}

export interface Strategy {
  readonly id: string;
  readonly title: string;
  readonly description: string;
  readonly implementationTip?: string;
  readonly category: 'visual-support' | 'transition' | 'sensory' | 'communication' | 'behavior' | 'social';
  readonly ageGroup: 'K-2' | '3-5' | '6-8' | 'All';
  readonly zone: 'blue' | 'green' | 'yellow' | 'red';
  readonly image: string;
  readonly isFavorite?: boolean;
}

export interface QuizQuestion {
  readonly id: string;
  readonly question: string;
  readonly options: readonly string[];
  readonly correctIndex: number;
  readonly explanation: string;
}

export interface SafetyQuiz {
  readonly id: string;
  readonly title: string;
  readonly focus: 'physical-management' | 'de-escalation' | 'safety-reminders';
  readonly weeklyFocus: {
    readonly title: string;
    readonly description: string;
  };
  readonly keyReminders: readonly string[];
  readonly questions: readonly QuizQuestion[];
}

export interface SignVideoStep {
  readonly step: number;
  readonly instruction: string;
  readonly duration: number;
}

export interface SignItem {
  readonly id: string;
  readonly word: string;
  readonly category: 'basic-needs' | 'emotional' | 'classroom';
  readonly description: string;
  readonly image: string;
  readonly tip: string;
  readonly videoUrl: string;
  readonly gifUrl: string;
  readonly videoSteps: readonly SignVideoStep[];
}

export interface SignLanguagePageContent {
  readonly rememberTitle: string;
  readonly rememberDescription: string;
}

export interface Event {
  readonly id: string;
  readonly title: string;
  readonly date: string;
  readonly type: 'meeting' | 'drill' | 'event' | 'deadline';
  readonly roles: readonly UserRole[];
}

export interface AttendanceRecord {
  readonly date: string;
  readonly status: 'present' | 'late' | 'absent';
  readonly note?: string;
}

export interface ParentMessage {
  readonly id: string;
  readonly template: string;
  readonly category: 'behavior' | 'event' | 'progress' | 'general';
  readonly lastSent?: string;
}

export type ZoneColor = 'blue' | 'green' | 'yellow' | 'red';

export interface ZoneInfo {
  readonly color: ZoneColor;
  readonly name: string;
  readonly description: string;
  readonly behaviors: readonly string[];
  readonly strategies: readonly string[];
  readonly signs: readonly string[];
  readonly bgClass: string;
  readonly textClass: string;
  readonly borderClass: string;
}

export interface ZonesSafetyConnection {
  readonly zoneColor: ZoneColor;
  readonly title: string;
  readonly description: string;
}

export interface ZonesDeEscalationStep {
  readonly step: string;
  readonly label: string;
  readonly description: string;
  readonly colorClass: string;
}

export interface ZonesOfRegulationPageContent {
  readonly safetyConnections: readonly ZonesSafetyConnection[];
  readonly quickDeEscalationFlowTitle: string;
  readonly quickDeEscalationFlow: readonly ZonesDeEscalationStep[];
}

export type ModuleId =
  | 'dashboard'
  | 'frame'
  | 'classroom'
  | 'timer'
  | 'qbs'
  | 'ei'
  | 'zones'
  | 'signs'
  | 'attendance'
  | 'parent-comm'
  | 'internal-comm'
  | 'safety'
  | 'handbook'
  | 'director'
  | 'community'
  | 'vocational'
  | 'esa'
  | 'walkthrough';

export interface WalkthroughCheckin {
  readonly id: string;
  readonly teacher_name: string;
  readonly classroom: string;
  readonly director_name: string;
  readonly check_in_date: string;
  readonly check_in_time: string;
  readonly attitude_rating: number;
  readonly attitude_comment?: string;
  readonly classroom_management_rating: number;
  readonly classroom_management_comment?: string;
  readonly cleanliness_rating: number;
  readonly cleanliness_comment?: string;
  readonly vibes_rating: number;
  readonly vibes_comment?: string;
  readonly team_dynamics_rating: number;
  readonly team_dynamics_comment?: string;
  readonly emergency_exit_rating: number;
  readonly emergency_exit_comment?: string;
  readonly lesson_plan_rating: number;
  readonly lesson_plan_comment?: string;
  readonly overall_notes?: string;
  readonly created_at?: string;
}

export interface Module {
  readonly id: ModuleId;
  readonly name: string;
  readonly icon: string;
  readonly roles: readonly UserRole[];
  readonly color: string;
  readonly routePath: string;
}
