// Mock data for Huddle

const GROUP = {
  name: "Weekend Crew",
  emoji: "🌴",
  members: [
    { id: 'u1', name: 'You',   avatar: 'Y', color: '#FF6B5B' },
    { id: 'u2', name: 'Maya',  avatar: 'M', color: '#F4A261' },
    { id: 'u3', name: 'Devon', avatar: 'D', color: '#2A9D8F' },
    { id: 'u4', name: 'Jules', avatar: 'J', color: '#8AA896' },
    { id: 'u5', name: 'Priya', avatar: 'P', color: '#E76F51' },
    { id: 'u6', name: 'Theo',  avatar: 'T', color: '#264653' },
    { id: 'u7', name: 'Sam',   avatar: 'S', color: '#C58BF2' },
  ],
};

const CATEGORIES = [
  { id: 'all',       label: 'All',       emoji: '✦',   tint: '#FF6B5B' },
  { id: 'food',      label: 'Food',      emoji: '🍕',  tint: '#FF8B5B' },
  { id: 'music',     label: 'Music',     emoji: '🎵',  tint: '#C58BF2' },
  { id: 'arts',      label: 'Arts',      emoji: '🎨',  tint: '#F4A261' },
  { id: 'active',    label: 'Active',    emoji: '🏃',  tint: '#2A9D8F' },
  { id: 'movies',    label: 'Movies',    emoji: '🎬',  tint: '#E76F51' },
  { id: 'outdoors',  label: 'Outdoors',  emoji: '🌲',  tint: '#8AA896' },
  { id: 'nightlife', label: 'Nightlife', emoji: '🌙',  tint: '#1E2A4A' },
];

// Abstract SVG placeholder generator — no external images
const P = (w, h, palette, pattern) => ({ w, h, palette, pattern });

// items: the universe. Dated items → Calendar/Feed, undated → Board.
const ITEMS = [
  {
    id: 'i1',
    type: 'event',
    title: 'Sunset Cinema — Moonrise Kingdom',
    source: 'eventbrite.com',
    url: 'eventbrite.com/sunset-cinema',
    date: 'Fri, Apr 19',
    time: '7:30pm',
    location: 'Dolores Park',
    category: 'movies',
    addedBy: 'u2',
    addedAt: '2h',
    note: 'bringing the picnic blanket 🌅',
    image: P(600, 360, ['#E76F51','#F4A261','#1E2A4A'], 'sunset'),
    downs: ['u2','u3','u4'],
    comments: 2,
  },
  {
    id: 'i2',
    type: 'activity',
    title: 'Little Gem — new natural wine bar',
    source: 'instagram.com',
    url: 'instagram.com/p/little-gem',
    category: 'food',
    addedBy: 'u3',
    addedAt: '5h',
    note: 'apparently the skin-contact is unreal',
    image: P(600, 800, ['#FF6B5B','#FFD4C2','#FBF6EE'], 'wineglass'),
    downs: ['u3','u5','u6','u2'],
    comments: 4,
  },
  {
    id: 'i3',
    type: 'activity',
    title: 'Pottery night at Mudroom',
    source: 'mudroom.studio',
    url: 'mudroom.studio/classes',
    category: 'arts',
    addedBy: 'u4',
    addedAt: '1d',
    image: P(600, 500, ['#F4A261','#FBF6EE','#8AA896'], 'pottery'),
    downs: ['u4','u7'],
    comments: 1,
  },
  {
    id: 'i4',
    type: 'event',
    title: 'Saturday Morning Run Club',
    source: 'strava.com',
    url: 'strava.com/clubs/sat-run',
    date: 'Sat, Apr 20',
    time: '8:00am',
    location: 'Panhandle',
    category: 'active',
    addedBy: 'u6',
    addedAt: '1d',
    image: P(600, 380, ['#2A9D8F','#8AA896','#FBF6EE'], 'track'),
    downs: ['u6'],
    comments: 0,
  },
  {
    id: 'i5',
    type: 'activity',
    title: 'Mission Trail hike w/ tacos after',
    source: 'alltrails.com',
    url: 'alltrails.com/mission-peak',
    category: 'outdoors',
    addedBy: 'u5',
    addedAt: '2d',
    note: 'do this before it gets too hot pls',
    image: P(600, 720, ['#8AA896','#2A9D8F','#FBF6EE'], 'hike'),
    downs: ['u5','u2','u4','u3','u6'],
    comments: 6,
  },
  {
    id: 'i6',
    type: 'event',
    title: 'Japanese Breakfast @ The Fillmore',
    source: 'songkick.com',
    url: 'songkick.com/concerts/japbreak',
    date: 'Sat, Apr 27',
    time: '9:00pm',
    location: 'The Fillmore',
    category: 'music',
    addedBy: 'u7',
    addedAt: '3d',
    note: 'got 4 tix — who wants??',
    image: P(600, 420, ['#C58BF2','#1E2A4A','#FFD4C2'], 'concert'),
    downs: ['u7','u1','u2','u4'],
    comments: 8,
  },
  {
    id: 'i7',
    type: 'activity',
    title: 'That weird taxidermy bar in Oakland',
    source: 'youtube.com',
    url: 'youtube.com/watch?xyz',
    category: 'nightlife',
    addedBy: 'u6',
    addedAt: '3d',
    image: P(600, 620, ['#1E2A4A','#C58BF2','#FBF6EE'], 'taxidermy'),
    downs: ['u6','u3'],
    comments: 2,
  },
  {
    id: 'i8',
    type: 'activity',
    title: 'Kindred — pasta tasting menu',
    source: 'resy.com',
    url: 'resy.com/cities/sf/kindred',
    category: 'food',
    addedBy: 'u2',
    addedAt: '4d',
    image: P(600, 540, ['#FF6B5B','#F4A261','#FBF6EE'], 'pasta'),
    downs: ['u2','u4','u5'],
    comments: 3,
  },
  {
    id: 'i9',
    type: 'activity',
    title: 'SFMOMA — Ruth Asawa retrospective',
    source: 'sfmoma.org',
    url: 'sfmoma.org/exhibition/asawa',
    category: 'arts',
    addedBy: 'u4',
    addedAt: '5d',
    note: 'on thru june — no rush but',
    image: P(600, 680, ['#FBF6EE','#1E2A4A','#F4A261'], 'asawa'),
    downs: ['u4','u5','u2'],
    comments: 1,
  },
  {
    id: 'i10',
    type: 'event',
    title: 'Dolores Park Picnic — Priya\'s bday',
    source: 'Manual',
    url: null,
    date: 'Sun, Apr 28',
    time: '2:00pm',
    location: 'Dolores Park, Hippie Hill side',
    category: 'outdoors',
    addedBy: 'u5',
    addedAt: '6d',
    note: 'bring snacks or blankets! 🎉',
    image: P(600, 460, ['#FFD4C2','#FF6B5B','#FBF6EE'], 'picnic'),
    downs: ['u5','u1','u2','u3','u4','u6','u7'],
    comments: 12,
  },
];

// Comments for the expanded Item Card (i2 — Little Gem)
const COMMENTS_I2 = [
  { id: 'c1', user: 'u3', text: 'went last week, the vibe alone is worth it', time: '4h' },
  { id: 'c2', user: 'u5', text: 'YES the orange wine slaps', time: '3h' },
  { id: 'c3', user: 'u6', text: 'thursday after work?', time: '2h' },
  { id: 'c4', user: 'u2', text: 'thursdays i have pottery, friday??', time: '1h' },
];

Object.assign(window, { GROUP, CATEGORIES, ITEMS, COMMENTS_I2 });
