// Granola integration — call notes & transcripts synced via MCP
window.GRANOLA = (() => {

  // Calls tied to Pinnacle Summit 2026 (current program)
  const CALLS = [
    {
      id: "call_01",
      title: "Pinnacle Summit · Final headcount + F&B alignment",
      date: "May 22, 2026", time: "2:30 PM PT", duration: "32 min", recency: "2 days ago",
      type: "client", // client | vendor | internal
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Dana Holloway",   org: "BlackLine",          role: "VP Events",          initials: "DH", color: "#225A85" },
        { name: "Marcus Chen",     org: "BlackLine",          role: "Sr. Manager",        initials: "MC", color: "#225A85" },
        { name: "Alyssa Keating",  org: "Just Right! DMC",    role: "Program Owner",      initials: "AK", color: "#B4741B" },
      ],
      summary: "Dana confirmed final headcount at 142 attendees (held from prelim) and walked through dietary breakdown — 18 vegetarian, 6 vegan, 4 gluten-free, 2 kosher. BlackLine wants menus finalized by Jun 14. Marcus pushed on whether the welcome reception bar can be branded-cocktail style; Alyssa to confirm with Resorts World.",
      topics: ["Final headcount", "Menu selections", "Dietary accommodations", "Welcome reception bar"],
      actionItems: [
        { text: "Confirm branded cocktail option with Resorts World F&B team", owner: "Alyssa Keating", status: "suggested", linkedTo: null },
        { text: "Send final dietary breakdown to PSAV (for crew meals)",       owner: "Alyssa Keating", status: "suggested", linkedTo: null },
        { text: "Submit menu selections by Jun 14",                            owner: "Dana Holloway",  status: "accepted", linkedTo: "todo_03" },
      ],
      transcript: "Dana: We're locking in at 142 — same as prelim. Marcus has the final dietary list. ... Marcus: Question on the welcome reception — can we do branded cocktails? Like a 'BlackLine Old Fashioned' kind of thing? ... Alyssa: I love that. Let me confirm with Zouk and Resorts World, I think their bar program supports it but want to triple-check the labor cost. ... Dana: Great. And menus we'll have to you by the 14th.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: true,
    },
    {
      id: "call_02",
      title: "PSAV pre-production walkthrough",
      date: "May 20, 2026", time: "11:00 AM PT", duration: "47 min", recency: "4 days ago",
      type: "vendor",
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Jamie Reyes",     org: "PSAV (Encore)",      role: "Production Lead",    initials: "JR", color: "#7B3FE4" },
        { name: "Trent Wallace",   org: "PSAV (Encore)",      role: "Lighting Designer",  initials: "TW", color: "#7B3FE4" },
        { name: "Alyssa Keating",  org: "Just Right! DMC",    role: "Program Owner",      initials: "AK", color: "#B4741B" },
        { name: "Lauren Brooks",   org: "Just Right! DMC",    role: "Producer",           initials: "LB", color: "#B4741B" },
      ],
      summary: "PSAV walked the general session AV layout and confirmed the lighting design direction. Jamie flagged that the rigging count is at the venue's max — adding any additional motors will require a special variance, +$3,200. Trent presented two lighting concepts; team aligned on Option B (warmer color wash, brand-aligned). Load-in moves to Sep 13 (one day earlier than original) at no additional cost.",
      topics: ["Lighting design lock", "Rigging limits", "Load-in timeline", "Variance on additional motors"],
      actionItems: [
        { text: "Send Option B lighting renderings to BlackLine for approval", owner: "Lauren Brooks",  status: "accepted", linkedTo: "todo_lighting" },
        { text: "Get formal variance quote from venue for additional motors",  owner: "Alyssa Keating", status: "accepted", linkedTo: null },
        { text: "Update ROS with new Sep 13 load-in start",                    owner: "Lauren Brooks",  status: "completed", linkedTo: null },
      ],
      transcript: "Jamie: We're maxed on rigging points. If you want any more motors we'd need a variance from the venue. ... Alyssa: How much are we talking? ... Jamie: Probably $3,200, give or take, plus a 5-day lead time. ... Trent: Option B feels more on-brand to me. The amber wash on the keynote backdrop especially — it'll pop on camera. ... Lauren: Agreed. Let's go with B.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: true,
    },
    {
      id: "call_03",
      title: "BlackLine · Budget review + deposit discussion",
      date: "May 19, 2026", time: "10:00 AM PT", duration: "28 min", recency: "5 days ago",
      type: "client",
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Dana Holloway",   org: "BlackLine",          role: "VP Events",          initials: "DH", color: "#225A85" },
        { name: "Priya Ramanan",   org: "BlackLine",          role: "Finance Partner",    initials: "PR", color: "#225A85" },
        { name: "Alyssa Keating",  org: "Just Right! DMC",    role: "Program Owner",      initials: "AK", color: "#B4741B" },
      ],
      summary: "Walked Priya through the budget breakdown line by line. She flagged the F&B contingency as 'higher than expected' — Alyssa explained the rationale (Vegas pricing volatility, last-minute headcount risk). Priya accepted but asked for a quarterly variance report. Deposit invoice ($248,631) will be processed by AP this week; payment by Jun 5.",
      topics: ["Budget walk-through", "F&B contingency", "Deposit timing", "Variance reporting cadence"],
      actionItems: [
        { text: "Set up quarterly variance reporting cadence with Priya",      owner: "Alyssa Keating", status: "suggested", linkedTo: null },
        { text: "Send deposit invoice to Dana + Priya",                        owner: "Alyssa Keating", status: "completed", linkedTo: "inv_dep" },
      ],
      transcript: "Priya: I'm seeing the F&B contingency at 12%. That feels high. ... Alyssa: It's a Vegas thing — last-minute headcount swings can move that line by 5-8% on their own. We can drop it to 9% but I'd flag the risk. ... Priya: No, let's keep it. But I want a variance report at the end of each quarter so we can spot pattern early. ... Dana: That works for me too.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: true,
    },
    {
      id: "call_04",
      title: "Bell Transportation · Arrival logistics & overflow plan",
      date: "May 14, 2026", time: "3:00 PM PT", duration: "23 min", recency: "10 days ago",
      type: "vendor",
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Rico Martinez",   org: "Bell Transportation", role: "Account Manager",   initials: "RM", color: "#7B3FE4" },
        { name: "Jennifer Gruebner", org: "Just Right! DMC", role: "Logistics Lead",      initials: "JG", color: "#B4741B" },
      ],
      summary: "Reviewed arrival window (Sep 14, 2-6pm) and confirmed 4 motorcoaches with backup overflow vehicle. Rico flagged a potential conflict with a NASCAR weekend that could affect dispatch — recommends building in 30 min buffer per run. Overtime rates discussed; Rico confirmed the rates in the original quote will hold.",
      topics: ["Arrival window", "Overflow contingency", "NASCAR weekend impact", "Overtime rates"],
      actionItems: [
        { text: "Build 30-min buffer into arrival schedule (per Rico's NASCAR flag)", owner: "Jennifer Gruebner", status: "accepted", linkedTo: null },
        { text: "Confirm overflow vehicle (Sprinter) for late arrivals",              owner: "Jennifer Gruebner", status: "completed", linkedTo: null },
      ],
      transcript: "Rico: One heads-up — there's a NASCAR weekend the prior weekend, traffic into the city could still be heavy that Monday. ... Jennifer: How much buffer should we add? ... Rico: I'd say 30 minutes per run, just to be safe. Better to wait than to have angry executives. ... Jennifer: Done. I'll update the ROS.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: true,
    },
    {
      id: "call_05",
      title: "Resorts World site walk debrief",
      date: "May 8, 2026", time: "4:00 PM PT", duration: "55 min", recency: "16 days ago",
      type: "vendor",
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Sarah Kim",       org: "Resorts World",       role: "Conference Services", initials: "SK", color: "#7B3FE4" },
        { name: "Alyssa Keating",  org: "Just Right! DMC",    role: "Program Owner",      initials: "AK", color: "#B4741B" },
        { name: "Lauren Brooks",   org: "Just Right! DMC",    role: "Producer",           initials: "LB", color: "#B4741B" },
        { name: "Dana Holloway",   org: "BlackLine",          role: "VP Events",          initials: "DH", color: "#225A85" },
      ],
      summary: "Three-hour site walk recap. Dana loved the Pearl Ballroom for the themed dinner but flagged the rigging height for a 'wow moment' aerial installation she's considering. Sarah confirmed the standard room block (142 keys) and walked through F&B venue options. AV restrictions discussed — outside production allowed but with house technician on standby ($800/day).",
      topics: ["Pearl Ballroom layout", "Aerial installation feasibility", "Room block", "F&B venue options", "AV restrictions"],
      actionItems: [
        { text: "Get formal quote for aerial installation rigging variance",   owner: "Alyssa Keating", status: "accepted", linkedTo: null },
        { text: "Confirm house tech standby cost on AV contract",              owner: "Lauren Brooks",  status: "completed", linkedTo: null },
        { text: "Share Pearl Ballroom layout with PSAV for production design", owner: "Lauren Brooks",  status: "completed", linkedTo: null },
      ],
      transcript: "Dana: This space is gorgeous. Is there any way we could do an aerial moment here? Like, a dancer descending from the rig as the keynote starts? ... Sarah: We've done it before — rigging height is 24 feet, but you'd need a variance for talent rigging and your own insurance rider. ... Alyssa: Let me see what PSAV would charge for that. It's a great moment if budget allows.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: false,
    },
    {
      id: "call_06",
      title: "BlackLine · Kickoff call",
      date: "Apr 28, 2026", time: "1:00 PM PT", duration: "62 min", recency: "26 days ago",
      type: "client",
      programCode: "BLT-LAS-2026-09",
      attendees: [
        { name: "Dana Holloway",   org: "BlackLine",          role: "VP Events",          initials: "DH", color: "#225A85" },
        { name: "Marcus Chen",     org: "BlackLine",          role: "Sr. Manager",        initials: "MC", color: "#225A85" },
        { name: "Alyssa Keating",  org: "Just Right! DMC",    role: "Program Owner",      initials: "AK", color: "#B4741B" },
        { name: "Lauren Brooks",   org: "Just Right! DMC",    role: "Producer",           initials: "LB", color: "#B4741B" },
      ],
      summary: "Official kickoff. Dana laid out the program objectives: top-150 leadership offsite, theme is 'Compound Growth.' Three signature moments: opening keynote with CEO, themed dinner with surprise entertainment, closing 'fireside' session. Budget envelope confirmed at $828K. Decision-making authority: Dana is primary, Marcus is secondary, Priya signs final invoices.",
      topics: ["Program objectives", "Theme: 'Compound Growth'", "Signature moments", "Budget envelope", "Decision rights"],
      actionItems: [
        { text: "Send proposal v2 with refined dinner concept", owner: "Alyssa Keating", status: "completed", linkedTo: null },
        { text: "Schedule weekly check-in cadence",             owner: "Lauren Brooks",  status: "completed", linkedTo: null },
      ],
      transcript: "Dana: The theme is Compound Growth — that's the through-line for everything. Decor, opening film, even the menu cards should pick it up. ... Marcus: We're being intentional this year — we want every moment to feel like it belongs to the same story. ... Alyssa: That gives us a lot to play with. I'm already thinking branching tree imagery, growth-ring centerpieces. We'll send a proposal v2 next week.",
      granolaUrl: "https://app.granola.ai/notes/...",
      hasRecording: true,
    },
  ];

  return { CALLS };
})();
