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

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

const USERS = {
  anna:   { name: 'Anna H.',   pace: '6:00–6:45', level: 'Beginner',     attended: 12, hosted: 7, reliability: 100, neighborhood: 'Clifton' },
  jay:    { name: 'Jay K.',    pace: '5:30–6:00', level: 'Intermediate', attended: 28, hosted: 4, reliability: 96,  neighborhood: 'Bedminster' },
  priya:  { name: 'Priya M.',  pace: '6:00–6:30', level: 'Intermediate', attended: 19, hosted: 11, reliability: 100, neighborhood: 'Southville' },
  tomek:  { name: 'Tomek P.',  pace: '5:45–6:15', level: 'Intermediate', attended: 9,  hosted: 1, reliability: 100, neighborhood: 'Easton' },
  rose:   { name: 'Rose D.',   pace: '6:30–7:15', level: 'Beginner',     attended: 6,  hosted: 0, reliability: 100, neighborhood: 'Bishopston' },
  marco:  { name: 'Marco V.',  pace: '5:30–6:00', level: 'Advanced',     attended: 42, hosted: 8, reliability: 100, neighborhood: 'Clifton' },
  noor:   { name: 'Noor S.',   pace: '6:00–6:30', level: 'Intermediate', attended: 14, hosted: 2, reliability: 100, neighborhood: 'St Pauls' },
  iris:   { name: 'Iris L.',   pace: '6:00–6:45', level: 'Beginner',     attended: 5,  hosted: 0, reliability: 100, neighborhood: 'Totterdown' },
};

const RUNS = [
  {
    id: 'r1',
    title: 'Easy shakeout 5K',
    blurb: 'Loop the downs, no pressure. We chat the whole way.',
    host: 'anna',
    area: 'Clifton Down',
    meetingHint: 'Water Tower area · BS8',
    meetingExact: 'Water Tower, by the south path (Ladies Mile 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 on Whiteladies after if you want.',
  },
  {
    id: 'r2',
    title: 'Women\u2019s lunch lap',
    blurb: 'Easy lap of Brandon Hill, back to desks by 1:15.',
    host: 'priya',
    area: 'Brandon Hill',
    meetingHint: 'Cabot Tower · BS1',
    meetingExact: 'Outside Cabot Tower, the side that faces the duck pond',
    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, the kiosk is on the way back.',
  },
  {
    id: 'r3',
    title: 'After-work loop',
    blurb: 'Steady pace, no chat for the last K.',
    host: 'jay',
    area: 'Harbourside',
    meetingHint: 'M Shed steps · BS1',
    meetingExact: 'On the M Shed steps, by the cranes',
    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',
    womenOnly: false,
    notes: 'Two laps along the harbour, finish at the Lloyds amphitheatre.',
  },
  {
    id: 'r4',
    title: 'Sunday long run',
    blurb: 'Easy chatty pace, dragging up through Ashton Court & back.',
    host: 'marco',
    area: 'Ashton Court Estate',
    meetingHint: 'Gatehouse · BS41',
    meetingExact: 'Just outside the main gatehouse, 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 along the deer park trail. Brunch optional at the café after.',
  },
  {
    id: 'r5',
    title: 'Coffee & 3K',
    blurb: 'Tiny social run for first-timers. Coffee on me.',
    host: 'rose',
    area: 'Wapping Wharf',
    meetingHint: 'Riverside · BS1',
    meetingExact: 'Riverside steps, by the Aardman 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 Mokoko.',
  },
];

// 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 Water Tower 🏃' },
  { id: 7, from: 'anna', time: '14:36', text: 'Welcome Sam! It\u2019s on the south side of the Water Tower, Ladies Mile gate.' },
];

// 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: 'Clifton Down',  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: 'Harbourside',     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: 'Ashton Court',    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 });
