// data.jsx — Brand palette and empty MOCK skeleton.
// Data is hydrated at runtime from the API (see api.js → API.hydrate).
// Components read from window.MOCK by reference, so we mutate properties of this
// same object after each fetch instead of replacing it.

const ABENDI = {
  green: "#004e2d",
  greenDark: "#003520",
  greenLight: "#1a6b48",
  greenSoft: "#2d8a62",
  gold: "#dda003",
  goldLight: "#e8b733",
  gray: "#c4c4c4",
  graySoft: "#e8eae9",
  // Page background — clean white. Sidebar stays dark green for brand presence.
  pageBg: "#ffffff",
  // Glass cards now render as solid white tiles with a subtle border. Keeping the
  // "glass" name to avoid renaming everything, but visually it's a flat card.
  glass: "#ffffff",
  glassBorder: "rgba(0, 78, 45, 0.10)",
  // Dark variants kept for the auth screen (which keeps the immersive look).
  bgTint: "rgba(8, 26, 18, 0.55)",
  glassDark: "rgba(20, 38, 28, 0.55)",
  glassBorderDark: "rgba(255, 255, 255, 0.45)",
  ink: "#0d1f15",
  inkSoft: "#445048",
  inkMute: "#7a857d",
  danger: "#b8331f",
  warn: "#c97a14",
  ok: "#2f7a3d",
};

window.MOCK = {
  ABENDI,
  STUDENTS: [],
  TEACHERS: [],
  CLASSES: [],
  SESSIONS: [],
  // Placeholder so components that read MOCK.SESSION_DETAIL.* before any session
  // is opened don't crash. Replaced when the user opens a specific session.
  SESSION_DETAIL: { id: "", date: "", duration: "", scenario: "", score: 0, defects: [], zones: [], events: [] },
  // Per-id caches populated lazily as views demand them
  _classStudents: {},
  _studentSessions: {},
  // The "logged user" placeholders — set after login by the App component.
  // These are read by components like StudentOverview that show personal data.
  ADMIN_USER:   { id: "", name: "", role: "admin",   initials: "" },
  TEACHER_USER: { id: "", name: "", role: "teacher", initials: "" },
  STUDENT_USER: { id: "", name: "", role: "student", initials: "" },
};
