/* global window */
// Vibramood · data.jsx — mock content for SEL kids game
window.VM = window.VM || {};

window.VM.player = {
  name: 'Kayla',
  age: 8,
  companion: 'tito',
  streak: 5,
  leaves: 24,
  vibrasCollected: 4,
  vibrasTotal: 12,
};

// Six moods, 1:1 with biomes, 1:1 with primary Vibra
window.VM.moods = [
  { key: 'senang',   label: 'Senang',   helper: 'Hatiku terang',   color: '#F5C26B', biome: 'meadow',  vibra: 'lumi' },
  { key: 'tenang',   label: 'Tenang',   helper: 'Aku damai',       color: '#4FB7C7', biome: 'cove',    vibra: 'tito' },
  { key: 'sedih',    label: 'Sedih',    helper: 'Hatiku berawan',  color: '#A7B6C2', biome: 'peak',    vibra: 'nimbo' },
  { key: 'marah',    label: 'Marah',    helper: 'Aku panas',       color: '#E08C7B', biome: 'canyon',  vibra: 'pyra' },
  { key: 'khawatir', label: 'Khawatir', helper: 'Aku ragu-ragu',   color: '#9CB58F', biome: 'woods',   vibra: 'fern' },
  { key: 'lelah',    label: 'Lelah',    helper: 'Aku perlu istirahat', color: '#B9A6CC', biome: 'hollow', vibra: 'mossy' },
];

window.VM.biomes = [
  { key: 'meadow', name: 'Sunny Meadow',   id: 'Padang Cerah',    mood: 'senang',   color: '#F5C26B', x: 70,  y: 110, unlocked: true,  vibrasFound: 1, vibrasTotal: 2 },
  { key: 'cove',   name: 'Calm Cove',      id: 'Teluk Tenang',    mood: 'tenang',   color: '#4FB7C7', x: 250, y: 60,  unlocked: true,  vibrasFound: 2, vibrasTotal: 2 },
  { key: 'woods',  name: 'Whisper Woods',  id: 'Hutan Berbisik',  mood: 'khawatir', color: '#9CB58F', x: 430, y: 130, unlocked: true,  vibrasFound: 1, vibrasTotal: 2 },
  { key: 'peak',   name: 'Cloud Peak',     id: 'Puncak Awan',     mood: 'sedih',    color: '#A7B6C2', x: 100, y: 320, unlocked: true,  vibrasFound: 0, vibrasTotal: 2 },
  { key: 'canyon', name: 'Ember Canyon',   id: 'Lembah Bara',     mood: 'marah',    color: '#E08C7B', x: 280, y: 380, unlocked: false, vibrasFound: 0, vibrasTotal: 2 },
  { key: 'hollow', name: 'Quiet Hollow',   id: 'Lubuk Sunyi',     mood: 'lelah',    color: '#B9A6CC', x: 450, y: 340, unlocked: false, vibrasFound: 0, vibrasTotal: 2 },
];

// 12 Vibras = 6 primary + 6 echoes (smaller siblings)
window.VM.vibras = [
  { key: 'tito',  name: 'Tito',  biome: 'cove',   color: '#4FB7C7', collected: true,  isCompanion: true, bio: 'Sahabatmu yang tenang. Suka mengajakmu bernapas pelan saat hatimu ramai.', firstMet: 'Hari ini' },
  { key: 'lumi',  name: 'Lumi',  biome: 'meadow', color: '#F5C26B', collected: true,  bio: 'Vibra cahaya kecil yang muncul saat kamu bersyukur.', firstMet: 'Senin lalu' },
  { key: 'fern',  name: 'Fern',  biome: 'woods',  color: '#9CB58F', collected: true,  bio: 'Vibra dedaunan yang tahu cara menenangkan pikiran khawatir.', firstMet: 'Kemarin' },
  { key: 'mossy', name: 'Mossy', biome: 'hollow', color: '#B9A6CC', collected: true,  bio: 'Vibra paling lembut. Mengajakmu beristirahat tanpa rasa bersalah.', firstMet: 'Minggu lalu' },
  { key: 'nimbo', name: 'Nimbo', biome: 'peak',   color: '#A7B6C2', collected: false },
  { key: 'pyra',  name: 'Pyra',  biome: 'canyon', color: '#E08C7B', collected: false },
  { key: 'echo-tito',  name: '?', biome: 'cove',   color: '#4FB7C7', collected: false, echo: true },
  { key: 'echo-lumi',  name: '?', biome: 'meadow', color: '#F5C26B', collected: false, echo: true },
  { key: 'echo-fern',  name: '?', biome: 'woods',  color: '#9CB58F', collected: false, echo: true },
  { key: 'echo-mossy', name: '?', biome: 'hollow', color: '#B9A6CC', collected: false, echo: true },
  { key: 'echo-nimbo', name: '?', biome: 'peak',   color: '#A7B6C2', collected: false, echo: true },
  { key: 'echo-pyra',  name: '?', biome: 'canyon', color: '#E08C7B', collected: false, echo: true },
];

// Activities inside a biome (Whisper Woods set as the demo biome)
window.VM.activities = {
  woods: {
    headline: 'Mari kita tenang bersama.',
    sub: 'Pikiran yang khawatir adalah daun yang berdesir. Kita dengarkan bersama Fern.',
    primary: {
      kind: 'breathing',
      title: 'Napas Daun',
      desc: 'Tarik napas (4) · Tahan (7) · Hembuskan (8). Ulangi tiga kali.',
      duration: '2 menit',
    },
    secondary: [
      { kind: 'story',    title: 'Cerita Pendek',         desc: 'Petualangan Fern di rimba pagi',     duration: '3 menit', icon: 'leaf' },
      { kind: 'color',    title: 'Warnai Daun',           desc: 'Latihan fokus tenang',                duration: '5 menit', icon: 'sparkle' },
      { kind: 'find',     title: 'Cari Vibra Tersembunyi', desc: 'Temukan teman baru di antara ranting', duration: '4 menit', icon: 'star' },
    ],
    progress: { done: 0, total: 3 },
  },
};

window.VM.journalWeek = [
  { day: 'Sen', mood: 'tenang',   note: 'Pagi yang santai. Tito menyapa.' },
  { day: 'Sel', mood: 'senang',   note: 'Bertemu Lumi di Padang Cerah.' },
  { day: 'Rab', mood: 'khawatir', note: 'Ada tes. Fern membantu bernapas.' },
  { day: 'Kam', mood: 'tenang',   note: 'Setelah Whisper Woods, hatiku sejuk.' },
  { day: 'Jum', mood: 'lelah',    note: 'Mossy mengajak rebahan sebentar.' },
  { day: 'Sab', mood: 'senang',   note: 'Hari menggambar di rumah.' },
  { day: 'Min', mood: 'khawatir', note: 'Sekolah besok — coba Whisper Woods lagi.' },
];

window.VM.findMood = (key) => window.VM.moods.find((m) => m.key === key);
window.VM.findBiome = (key) => window.VM.biomes.find((b) => b.key === key);
window.VM.findVibra = (key) => window.VM.vibras.find((v) => v.key === key);
