// data.jsx — mock runs, users, messages

const ME = {
  id: 'me',
  name: 'You',
  firstName: 'Sam',
  gender: 'female',
  paceMin: '6:00', paceMax: '6:45',
  distancePref: '5K',
  level: 'Beginner',
  neighborhood: 'Clapham',
  attended: 4,
  hosted: 0,
};

const USERS = {
  anna:   { name: 'Anna H.',   gender: 'female', pace: '6:00–6:45', level: 'Beginner',     attended: 12, hosted: 7,  neighborhood: 'Clapham' },
  jay:    { name: 'Jay K.',    gender: 'male',   pace: '5:30–6:00', level: 'Intermediate', attended: 28, hosted: 4,  neighborhood: 'Battersea' },
  priya:  { name: 'Priya M.',  gender: 'female', pace: '6:00–6:30', level: 'Intermediate', attended: 19, hosted: 11, neighborhood: 'Wandsworth' },
  tomek:  { name: 'Tomek P.',  gender: 'male',   pace: '5:45–6:15', level: 'Intermediate', attended: 9,  hosted: 1,  neighborhood: 'Stockwell' },
  rose:   { name: 'Rose D.',   gender: 'female', pace: '6:30–7:15', level: 'Beginner',     attended: 6,  hosted: 0,  neighborhood: 'Balham' },
  marco:  { name: 'Marco V.',  gender: 'male',   pace: '5:30–6:00', level: 'Advanced',     attended: 42, hosted: 8,  neighborhood: 'Clapham' },
  noor:   { name: 'Noor S.',   gender: 'female', pace: '6:00–6:30', level: 'Intermediate', attended: 14, hosted: 2,  neighborhood: 'Brixton' },
  iris:   { name: 'Iris L.',   gender: 'female', pace: '6:00–6:45', level: 'Beginner',     attended: 5,  hosted: 0,  neighborhood: 'Tooting' },
};

const RUNS = [
  {
    id: 'r1',
    title: 'Easy shakeout 5K',
    blurb: 'Loop the common, no pressure. We chat the whole way.',
    host: 'anna',
    area: 'Clapham Common',
    meetingHint: 'Bandstand area · SW4',
    meetingExact: 'Bandstand, by the southern entrance (Long Rd gate)',
    when: 'Today',
    time: '18:30',
    dateLong: 'Tue 19 May · 18:30',
    distance: '5K',
    paceMin: '6:00', paceMax: '7:00',
    level: 'Beginner-friendly',
    capacity: 8,
    joined: ['anna', 'rose', 'iris'],
    pending: ['tomek', 'me'],
    visibility: 'public',
    womenOnly: false,
    notes: 'Flat-ish loop, two water fountains on route. Stick around for a coffee after if you want.',
  },
  {
    id: 'r2',
    title: 'Women\u2019s lunch lap',
    blurb: 'Easy lap of Wandsworth Common, back to desks by 1:15.',
    host: 'priya',
    area: 'Wandsworth Common',
    meetingHint: 'Skylark café · SW18',
    meetingExact: 'Outside Skylark café, the side that faces the playground',
    when: 'Tomorrow',
    time: '12:30',
    dateLong: 'Wed 20 May · 12:30',
    distance: '4K',
    paceMin: '5:45', paceMax: '6:30',
    level: 'All levels',
    capacity: 5,
    joined: ['priya', 'noor', 'iris'],
    pending: [],
    visibility: 'public',
    womenOnly: true,
    notes: 'Bring a card for coffee after, café is on the way back.',
  },
  {
    id: 'r3',
    title: 'After-work loop',
    blurb: 'Steady pace, no chat for the last K.',
    host: 'jay',
    area: 'Battersea Park',
    meetingHint: 'Sun Gate · SW11',
    meetingExact: 'Inside the Sun Gate, by the noticeboard',
    when: 'Wed',
    time: '19:00',
    dateLong: 'Wed 20 May · 19:00',
    distance: '8K',
    paceMin: '5:30', paceMax: '6:00',
    level: 'Intermediate',
    capacity: 8,
    joined: ['jay', 'tomek'],
    pending: [],
    visibility: 'public',
    openToJoin: true,
    womenOnly: false,
    notes: 'Two laps of the park, finish at the bandstand.',
  },
  {
    id: 'r4',
    title: 'Sunday long run',
    blurb: 'Easy chatty pace, dragging through Battersea & back.',
    host: 'marco',
    area: 'Battersea Park',
    meetingHint: 'Rosery Gate · SW11',
    meetingExact: 'Just outside Rosery Gate, by the bike racks',
    when: 'Sun',
    time: '08:00',
    dateLong: 'Sun 24 May · 08:00',
    distance: '12K',
    paceMin: '5:30', paceMax: '6:00',
    level: 'Intermediate',
    capacity: 6,
    joined: ['marco', 'jay', 'tomek', 'noor'],
    pending: [],
    visibility: 'public',
    womenOnly: false,
    notes: 'Out-and-back via the river path. Brunch optional after.',
  },
  {
    id: 'r5',
    title: 'Coffee & 3K',
    blurb: 'Tiny social run for first-timers. Coffee on me.',
    host: 'rose',
    area: 'Battersea Power Stn',
    meetingHint: 'Riverside · SW11',
    meetingExact: 'Riverside steps, by the WH Smith side',
    when: 'Sat',
    time: '09:00',
    dateLong: 'Sat 23 May · 09:00',
    distance: '3K',
    paceMin: '6:45', paceMax: '7:30',
    level: 'Beginner',
    capacity: 6,
    joined: ['rose', 'iris'],
    pending: [],
    visibility: 'public',
    womenOnly: false,
    notes: 'Bring whatever, we\u2019ll be slow. Coffee after at Black Sheep.',
  },
];

// Group chat messages (run r1, after approval)
const CHAT = [
  { id: 1, system: true, text: 'Anna created this chat. It\u2019ll close 12 hours after the run.' },
  { id: 2, from: 'anna', time: '14:02', text: 'Hey both! Looking forward to tonight 🙌 weather looks dry.' },
  { id: 3, from: 'rose', time: '14:11', text: 'Same! What if it rains lol' },
  { id: 4, from: 'anna', time: '14:12', text: 'We still go — just slower. I\u2019ll bring a backup plan if it\u2019s heavy.' },
  { id: 5, system: true, text: 'Sam joined the run.' },
  { id: 6, from: 'me',   time: '14:34', text: 'Just got approved — see you at the bandstand 🏃' },
  { id: 7, from: 'anna', time: '14:36', text: 'Welcome Sam! It\u2019s on the Long Rd side of the bandstand.' },
];

// Host-side pending join requests
const REQUESTS = [
  { user: 'tomek', message: 'Hey! New to the area, would love to join.', when: '12 min ago' },
  { user: 'me',    message: 'First social run for me — promise to keep up 😅', when: '4 min ago' },
];

// Runs the current user has requested or joined — for "You" page
const MY_RUNS = [
  { runId: 'r2', status: 'going',   joinedAt: 'yesterday' },
  { runId: 'r5', status: 'going',   joinedAt: '2 days ago' },
  { runId: 'r1', status: 'pending', joinedAt: 'today, 4 min ago' },
  { runId: 'r3', status: 'pending', joinedAt: '2 hours ago' },
];

// Runs hosted by the current user — for "Manage" index
const MY_HOSTED = [
  { id: 'h1', title: 'Sam\u2019s Wednesday 5K',  area: 'Clapham Common',  dateLong: 'Wed 20 May · 18:30',  shortDate: 'Tomorrow', time: '18:30',
    distance: '5K', paceMin: '6:00', paceMax: '6:45', joined: 2, pending: 3, capacity: 6, womenOnly: false, status: 'today' },
  { id: 'h2', title: 'Saturday slow 3K',          area: 'Battersea Park',  dateLong: 'Sat 23 May · 09:00',  shortDate: 'Sat 23', time: '09:00',
    distance: '3K', paceMin: '6:30', paceMax: '7:15', joined: 1, pending: 0, capacity: 5, womenOnly: false, status: 'upcoming' },
  { id: 'h3', title: 'After-work 8K loop',        area: 'Battersea Park',  dateLong: 'Tue 26 May · 19:00',  shortDate: 'Tue 26', time: '19:00',
    distance: '8K', paceMin: '5:45', paceMax: '6:15', joined: 3, pending: 1, capacity: 8, womenOnly: false, status: 'upcoming' },
];

Object.assign(window, { ME, USERS, RUNS, CHAT, REQUESTS, MY_RUNS, MY_HOSTED });
