// Loop — sample data. Stable, realistic, calm tone.
// Exports: window.LoopData

const PEOPLE = [
  { id: 'sarah',   name: 'Sarah Chen',      org: 'Partner, Lightline',     init: 'SC', tint: '#D9C7B0' },
  { id: 'marcus',  name: 'Marcus Okafor',   org: 'CEO, Northbound',         init: 'MO', tint: '#BCC8D6' },
  { id: 'priya',   name: 'Priya Anand',     org: 'Recruiter, Forward Talent', init: 'PA', tint: '#C8D6C0' },
  { id: 'leah',    name: 'Leah Goldberg',   org: 'EA, Stripe',              init: 'LG', tint: '#E0CFC2' },
  { id: 'jun',     name: 'Jun Park',        org: 'Eng Lead, Vellum',        init: 'JP', tint: '#CFC4DB' },
  { id: 'amelia',  name: 'Amelia Brooks',   org: 'Investor, Highline VC',    init: 'AB', tint: '#D6CBB6' },
  { id: 'rafa',    name: 'Rafael Mendes',   org: 'Customer Success',         init: 'RM', tint: '#C5D2D4' },
  { id: 'noor',    name: 'Noor Hadid',      org: 'Designer, friend',         init: 'NH', tint: '#DDC9CB' },
];

const QUEUE = [
  {
    id: 'q1',
    personId: 'sarah',
    kind: 'reply',
    kindLabel: 'Reply now',
    preview: '"Can we push our 1:1 to Thursday afternoon? Wednesday got swallowed."',
    suggested: "Thursday works — 2:00pm your time? I'll keep the same agenda.",
    why: 'Sarah usually replies within 4h. This thread has been open 2 days.',
    confidence: 0.94,
    minutes: 1,
    channel: 'Gmail',
    received: '2h ago',
  },
  {
    id: 'q2',
    personId: 'marcus',
    kind: 'thanks',
    kindLabel: 'Send thanks',
    preview: 'Marcus sent the diligence memo you asked for on Monday.',
    suggested: 'Thanks Marcus — really helpful framing on the GTM section. I owe you a coffee.',
    why: 'You promised a thank-you in your last reply. 3 days passed.',
    confidence: 0.88,
    minutes: 1,
    channel: 'Gmail',
    received: '3d ago',
  },
  {
    id: 'q3',
    personId: 'priya',
    kind: 'schedule',
    kindLabel: 'Schedule',
    preview: '"Could we find 20 min next week for the Ellis role?"',
    suggested: 'Proposed Tue 10:30 or Wed 4:00 (your calendar is clear both).',
    why: 'Priya prefers mornings. Both slots leave 30 min buffer.',
    confidence: 0.91,
    minutes: 2,
    channel: 'Gmail',
    received: '5h ago',
  },
  {
    id: 'q4',
    personId: 'leah',
    kind: 'approve',
    kindLabel: 'Approve draft',
    preview: 'Leah confirmed the venue change for the Sept offsite.',
    suggested: 'Acknowledged — please loop in Daniel for the AV walk-through.',
    why: 'Routine acknowledgement. Leah expects a quick yes.',
    confidence: 0.96,
    minutes: 1,
    channel: 'Outlook',
    received: '1h ago',
  },
  {
    id: 'q5',
    personId: 'jun',
    kind: 'followup',
    kindLabel: 'Follow up',
    preview: 'You said you\'d send Jun the Vellum eval doc "by EOW".',
    suggested: 'Here\'s the eval doc — section 3 is the part we discussed.',
    why: 'Promise made Friday. Today is Tuesday.',
    confidence: 0.82,
    minutes: 3,
    channel: 'Slack',
    received: '4d ago',
  },
  {
    id: 'q6',
    personId: 'amelia',
    kind: 'reply',
    kindLabel: 'Reply now',
    preview: '"Quick gut check — are you open to a small follow-on?"',
    suggested: 'Open to it. Can I send you our last two board updates first?',
    why: 'Amelia\'s a key relationship. Same-day reply preserves momentum.',
    confidence: 0.79,
    minutes: 2,
    channel: 'Gmail',
    received: '40m ago',
  },
];

const SUMMARY = {
  date: 'Tuesday, May 28',
  cleared: 14,
  replies: 9,
  followups: 3,
  pending: 2,
  relationships: 11,
  minutesSaved: 47,
  highlight: 'You closed three loops that had been open over a week.',
};

const RELATIONSHIP_NOTES = {
  sarah: {
    cadence: 'Weekly',
    lastTouch: '2 days ago',
    tone: 'Direct, warm',
    promises: ['Send Q3 roadmap by Friday'],
    insights: 'Sarah responds fastest in the morning. Avoid scheduling on Wednesdays — she blocks for deep work.',
    recent: [
      { kind: 'reply',   text: 'Replied to your push on the offsite agenda', when: '2d' },
      { kind: 'meeting', text: '1:1 — 30 min, covered Q3 hiring',           when: '9d' },
      { kind: 'thanks',  text: 'Thanked you for the Lightline intro',        when: '14d' },
    ],
  },
};

const ACTIVITY = [
  { id: 'a1', when: '9:42 AM', what: 'Drafted reply to Sarah Chen', state: 'pending', detail: 'Awaiting your approval.' },
  { id: 'a2', when: '9:31 AM', what: 'Sent acknowledgement to Leah Goldberg', state: 'sent', detail: 'You approved at 9:30.' },
  { id: 'a3', when: '8:58 AM', what: 'Scheduled "Coffee — Marcus"', state: 'sent', detail: 'Thu, May 30, 8:30am at Sightglass.' },
  { id: 'a4', when: '8:15 AM', what: 'Scanned 142 new messages', state: 'system', detail: 'Found 12 clearable loops.' },
  { id: 'a5', when: 'Yesterday', what: 'Snoozed reply to Rafael Mendes', state: 'snoozed', detail: 'Will resurface tomorrow morning.' },
  { id: 'a6', when: 'Yesterday', what: 'Drafted follow-up to Jun Park', state: 'edited', detail: 'You edited 2 sentences before sending.' },
];

window.LoopData = { PEOPLE, QUEUE, SUMMARY, RELATIONSHIP_NOTES, ACTIVITY };
