// data.jsx — Cortex GTM Engineering: request + ticketing system
// Every ticket = a problem a GTM team has + the ultimate outcome we're trying to create

// ---------- Statuses (simple 4-state)
const STATUSES = [
  { id: 'triage',   label: 'Triage',      short: 'Triage',      color: '#71717a', icon: 'TrayIcon' },
  { id: 'progress', label: 'In progress', short: 'In progress', color: '#7458DB', icon: 'GitBranchIcon' },
  { id: 'shipped',  label: 'Shipped',     short: 'Shipped',     color: '#16a34a', icon: 'RocketLaunchIcon' },
  { id: 'done',     label: 'Done',        short: 'Done',        color: '#0ea5e9', icon: 'CheckCircleIcon' },
];

// ---------- Phase markers (drawn on the progress bar inside 'In progress')
const PHASES = [
  { id: 'discovery', label: 'Discovery' },
  { id: 'scoping',   label: 'Scoping' },
  { id: 'building',  label: 'Building' },
  { id: 'review',    label: 'Review' },
  { id: 'piloting',  label: 'Piloting' },
  { id: 'launched',  label: 'Launched' },
  { id: 'measuring', label: 'Measuring' },
];

// ---------- People (owners + requesters)
// Add team members here: { id: 'XX', name: 'Full Name', role: 'Role', n: 1–5 }
// n: controls avatar color (1–5 cycles through palette)
const PEOPLE = {
  JD:    { id: 'JD', name: 'Joe DeVille',  role: 'GTM Engineer',  n: 1 },
  NEURA: { id: 'NR', name: 'Neura',        role: 'Cortex AI',     n: 5, bot: true },
};

// ---------- Teams (requester orgs)
const TEAMS = [
  { id: 'sales',      label: 'Sales',            color: '#2563eb', icon: 'CurrencyDollarIcon' },
  { id: 'marketing',  label: 'Marketing',        color: '#f59e0b', icon: 'MegaphoneIcon' },
  { id: 'cs',         label: 'Customer Success', color: '#16a34a', icon: 'LifebuoyIcon' },
  { id: 'revops',     label: 'RevOps',           color: '#7458DB', icon: 'ChartLineUpIcon' },
  { id: 'solutions',  label: 'Solutions',        color: '#ec4899', icon: 'StackIcon' },
  { id: 'finance',    label: 'Finance',          color: '#0ea5e9', icon: 'TableIcon' },
  { id: 'executive',  label: 'Executive',        color: '#64748b', icon: 'BuildingsIcon' },
];

const PRIORITIES = {
  urgent: { label: 'Urgent', color: '#dc2626', icon: 'FireIcon' },
  high:   { label: 'High',   color: '#f59e0b', icon: 'ArrowUpIcon' },
  med:    { label: 'Medium', color: '#71717a', icon: 'EqualsIcon' },
  low:    { label: 'Low',    color: '#a1a1aa', icon: 'ArrowDownIcon' },
};

const LABELS = {
  'ai-agent':    { label: 'AI agent',    color: '#7458DB' },
  'automation':  { label: 'Automation',  color: '#f59e0b' },
  'pipeline':    { label: 'Pipeline',    color: '#2563eb' },
  'tool':        { label: 'Tool',        color: '#16a34a' },
  'ai-model':    { label: 'AI model',    color: '#ec4899' },
  'infra':       { label: 'Infra',       color: '#64748b' },
  'analytics':   { label: 'Analytics',   color: '#0ea5e9' },
};

// ---------- Tickets
// Each ticket uses JTBD framing:
//   when: situation, need: motivation, outcome: result
const TICKETS = [];

// ---------- North-star goals tickets ladder up to
const NORTH_STARS = [
  { id: 'velocity',     label: 'GTM velocity',       desc: 'Every motion faster: enrich, route, recap, close.',          color: '#7458DB', count: 0 },
  { id: 'retention',    label: 'Retention lift',      desc: 'See churn earlier. Save accounts. Grow existing customers.', color: '#16a34a', count: 0 },
  { id: 'efficiency',   label: 'Capacity unlock',     desc: 'Give every GTM person back hours. No headcount adds.',       color: '#f59e0b', count: 0 },
  { id: 'intelligence', label: 'Revenue intelligence', desc: 'One source of truth. Better decisions. Faster reviews.',    color: '#0ea5e9', count: 0 },
];

// ---------- Global metrics (homepage hero)
const GLOBAL_METRICS = [
  { label: 'Tickets in flight',     value: '0',   delta: '',  trend: 'up' },
  { label: 'Pipeline impact / qtr', value: '$0',  unit: '',   delta: '', trend: 'up' },
  { label: 'Median cycle time',     value: '—',   unit: '',   delta: '', trend: 'up' },
  { label: 'LLM spend / mo',        value: '$0',  unit: '',   delta: '', trend: 'up' },
];

// ---------- Playbooks (delivery phase guide)
const PLAYBOOKS = [
  { phase: 'discovery', duration: '1–3 days',  owner: 'Requester + PM', goals: ['Understand the pain + current workaround', 'Size business value', 'Frame the ultimate outcome'], artifacts: ['Intake brief', 'JTBD statement', 'Priority'], automations: ['Auto-Linear ticket', 'Neura finds similar tools', '#gtm-eng-queue post'] },
  { phase: 'scoping',   duration: '3–5 days',  owner: 'Eng lead + PM',  goals: ['Agree on the success metric', 'Pick stack + vendors', 'Draft eval suite'], artifacts: ['Scoping doc', 'Eval dataset', 'Cost estimate'], automations: ['Vendor compare table', 'Cost forecast', 'Neura-drafted design doc'] },
  { phase: 'building',  duration: '1–3 weeks', owner: 'Engineer',        goals: ['Ship to staging', 'Hit eval targets', 'Instrument everything'], artifacts: ['PRs', 'Eval scorecard', 'Dashboards'], automations: ['Preview envs', 'Nightly evals', 'Regression alerts'] },
  { phase: 'review',    duration: '2–3 days',  owner: 'Peer + security', goals: ['Code review', 'Security review', 'Data access review'], artifacts: ['Review checklist', 'Threat model', 'PII audit'], automations: ['Auto-request reviews', 'Secret scan', 'Policy checks'] },
  { phase: 'piloting',  duration: '1–2 weeks', owner: 'Requester + PM',  goals: ['5–20 user pilot', 'Daily feedback', 'Prove the lift'], artifacts: ['Pilot plan', 'Feedback log', 'Before/after'], automations: ['Pilot analytics', 'Daily digest', 'Interview scheduler'] },
  { phase: 'launched',  duration: '1 week',    owner: 'Eng + PM',        goals: ['Roll out to all users', 'Train them', 'Hand off to Platform'], artifacts: ['Launch comms', 'Runbook', 'Training recording'], automations: ['Email blast', 'Onboarding add', 'PagerDuty'] },
  { phase: 'measuring', duration: 'Ongoing',   owner: 'Platform + Eng',  goals: ['Track adoption', 'Watch cost + quality', "Kill what isn't working"], artifacts: ['Adoption dashboard', 'Cost vs. value', 'Quarterly review'], automations: ['Anomaly detection', 'Auto-pause on eval drop', 'Cost digest'] },
];

Object.assign(window, {
  STATUSES, PHASES, PEOPLE, TEAMS, PRIORITIES, LABELS,
  TICKETS, NORTH_STARS, GLOBAL_METRICS, PLAYBOOKS,
});
