export const MODULE_KEYS = [
  'core', 'users', 'students', 'teachers', 'classes', 'subjects', 'schedule',
  'attendance', 'homework', 'exams', 'grades', 'reports', 'messages', 'sms',
  'voting', 'online_class',
] as const;

export type ModuleKey = typeof MODULE_KEYS[number];

export type PageProps<T extends Record<string, unknown> = Record<string, unknown>> = T & {
  auth?: {
    user?: {
      id: number;
      username: string;
      firstName: string;
      lastName: string;
      roleKey: string;
      schoolId?: number;
      schoolName?: string;
      avatarUrl?: string | null;
    };
  };
  modules?: ModuleKey[];
  flash?: {
    success?: string;
    error?: string;
  };
};
