// Mock data for the NalarX prototype.
// Vertical packs — each defines the use case context, sample queries, sample sources.

const VERTICALS = {
  procurement: {
    label: 'Procurement Intelligence',
    short: 'Procurement',
    tagline: 'Find the right supplier, contract, and price — across every system you own.',
    metricA: { label: 'Avg. cycle time', value: '6.4d', delta: '−38%' },
    metricB: { label: 'Maverick spend caught', value: '$1.42M', delta: '+12 alerts' },
    metricC: { label: 'Contracts up for renewal', value: '23', delta: 'this quarter' },
    suggestions: [
      'Which suppliers have contracts expiring in Q3?',
      'Compare unit prices for office laptops across vendors',
      'Show all POs over $50k pending approval > 5 days',
      'Which contracts have unfavorable termination clauses?',
    ],
    askExample: 'Compare unit prices for Dell Latitude 5450 across vendors in 2025',
    answerLead: 'Across 4 connected vendors, Dell Latitude 5450 unit prices ranged from $1,184 to $1,402 in 2025.',
    answerBullets: [
      { text: 'Synnex offered the lowest avg. price ($1,184) on volumes ≥ 50 units.', cite: 1 },
      { text: 'Ingram Micro pricing rose 4.8% YoY, primarily on Q2 SKUs.', cite: 2 },
      { text: 'A pending PO with TechData ($1,402/unit, qty 30) is 11% above category median.', cite: 3 },
    ],
    citations: [
      { label: 'SAP Ariba › PO #4471209', source: 'SAP', kind: 'database' },
      { label: 'Coupa › Vendor Catalog 2025', source: 'Coupa', kind: 'sheet' },
      { label: 'finance-ops › Q2-vendor-review.pdf', source: 'SharePoint', kind: 'doc' },
    ],
  },
  fraud: {
    label: 'Fraud Detection',
    short: 'Fraud',
    tagline: 'Surface suspicious activity across transactions, identities, and systems — in plain English.',
    metricA: { label: 'Cases flagged (7d)', value: '47', delta: '+8' },
    metricB: { label: 'Recovered amount', value: '$284K', delta: 'this month' },
    metricC: { label: 'Median time-to-detect', value: '2.1h', delta: '−47%' },
    suggestions: [
      'Show transactions over $10k flagged by velocity rule today',
      'Which merchant IDs share device fingerprints?',
      'List dormant accounts reactivated in the last 24h',
      'Find chargebacks tied to refund-then-purchase patterns',
    ],
    askExample: 'Show transactions over $10k flagged by velocity rule in the last 24h',
    answerLead: '11 transactions over $10k tripped velocity thresholds in the last 24 hours, totaling $187,420.',
    answerBullets: [
      { text: '6 originate from 2 device fingerprints reused across new accounts (<48h old).', cite: 1 },
      { text: 'Merchant MCC 5967 accounts for 64% of flagged value; 3.2× baseline.', cite: 2 },
      { text: 'Recommended: hold 4 transactions pending manual review (analyst queue).', cite: 3 },
    ],
    citations: [
      { label: 'Postgres › transactions (24h)', source: 'Postgres', kind: 'database' },
      { label: 'BigQuery › device_fingerprints', source: 'BigQuery', kind: 'database' },
      { label: 'risk-ops › playbook-velocity-v3.md', source: 'GDrive', kind: 'doc' },
    ],
  },
  compliance: {
    label: 'Compliance & Audit',
    short: 'Compliance',
    tagline: 'Answer auditor questions in minutes, not weeks — pulled from your real systems.',
    metricA: { label: 'Open audit items', value: '34', delta: '−12' },
    metricB: { label: 'Controls passing', value: '94%', delta: '+3pt' },
    metricC: { label: 'Avg. evidence pull', value: '4 min', delta: '−92%' },
    suggestions: [
      'Pull SOC 2 evidence for access reviews — Q2',
      'Which employees retain access > 30d after role change?',
      'List vendors processing PII without DPA on file',
      'Show all data exports over 10MB in the past week',
    ],
    askExample: 'Pull SOC 2 access review evidence for finance systems — Q2',
    answerLead: 'Q2 access reviews completed for 4 of 5 finance systems; 1 outstanding (NetSuite, owner pending).',
    answerBullets: [
      { text: '142 user-system pairs reviewed; 6 access removals executed.', cite: 1 },
      { text: '2 reviewers missed the 14-day SLA; flagged for compliance.', cite: 2 },
      { text: 'Evidence package generated; 23 artifacts attached to control AC-2.', cite: 3 },
    ],
    citations: [
      { label: 'Okta › access_logs Q2', source: 'Okta', kind: 'database' },
      { label: 'JIRA › audit-q2 board', source: 'JIRA', kind: 'database' },
      { label: 'compliance › evidence-template.xlsx', source: 'SharePoint', kind: 'sheet' },
    ],
  },
  hr: {
    label: 'People Operations',
    short: 'HR',
    tagline: 'Answer people-data questions instantly — without the analyst ticket queue.',
    metricA: { label: 'Open reqs', value: '52', delta: '+4' },
    metricB: { label: 'Attrition (rolling 90d)', value: '6.8%', delta: '−1.4pt' },
    metricC: { label: 'Time-to-hire', value: '34d', delta: '−6d' },
    suggestions: [
      'Which teams have grown > 20% YoY?',
      'Show salary band outliers for L4 engineers in APAC',
      'Compensation review: who is below band midpoint?',
      'List employees overdue on annual training',
    ],
    askExample: 'Which engineering teams grew >20% YoY and what is their attrition?',
    answerLead: '3 engineering teams grew >20% YoY: Platform (+34%), Data (+28%), Mobile (+22%).',
    answerBullets: [
      { text: 'Platform attrition is 2.1% (well below 6.8% co. avg.).', cite: 1 },
      { text: 'Data team carries 7 open reqs older than 60 days.', cite: 2 },
      { text: 'Mobile shows highest internal-transfer rate at 11%.', cite: 3 },
    ],
    citations: [
      { label: 'Workday › headcount_v2', source: 'Workday', kind: 'database' },
      { label: 'Greenhouse › req_pipeline', source: 'Greenhouse', kind: 'database' },
      { label: 'people-ops › 2025-Q2-review.pdf', source: 'GDrive', kind: 'doc' },
    ],
  },
};

// Connector catalog — original generic logos rendered as monogram tiles.
// Categories used by the marketplace + wizard.
const CONNECTORS = [
  { id: 'postgres',  name: 'Postgres',     cat: 'Database',      tone: '#336791', mono: 'Pg',  status: 'connected', records: '24.1M', synced: '2 min ago' },
  { id: 'mysql',     name: 'MySQL',        cat: 'Database',      tone: '#00758f', mono: 'My',  status: 'connected', records: '8.7M',  synced: '5 min ago' },
  { id: 'bigquery',  name: 'BigQuery',     cat: 'Database',      tone: '#4285f4', mono: 'Bq',  status: 'connected', records: '142M',  synced: '12 min ago' },
  { id: 'snowflake', name: 'Snowflake',    cat: 'Database',      tone: '#29b5e8', mono: 'Sn',  status: 'syncing',   records: '—',     synced: 'now' },
  { id: 'redshift',  name: 'Redshift',     cat: 'Database',      tone: '#cc4300', mono: 'Rs',  status: 'available' },
  { id: 'mongo',     name: 'MongoDB',      cat: 'Database',      tone: '#13aa52', mono: 'Mo',  status: 'available' },
  { id: 's3',        name: 'Amazon S3',    cat: 'Files',         tone: '#e25444', mono: 'S3',  status: 'connected', records: '4,210 docs', synced: '1 hr ago' },
  { id: 'gdrive',    name: 'Google Drive', cat: 'Files',         tone: '#1fa463', mono: 'Gd',  status: 'connected', records: '12,847 docs', synced: '8 min ago' },
  { id: 'sharepoint',name: 'SharePoint',   cat: 'Files',         tone: '#0078d4', mono: 'Sp',  status: 'connected', records: '6,109 docs', synced: '22 min ago' },
  { id: 'dropbox',   name: 'Dropbox',      cat: 'Files',         tone: '#0061ff', mono: 'Dx',  status: 'available' },
  { id: 'box',       name: 'Box',          cat: 'Files',         tone: '#1665d8', mono: 'Bx',  status: 'available' },
  { id: 'okta',      name: 'Okta',         cat: 'SSO & Identity',tone: '#007dc1', mono: 'Ok',  status: 'connected', records: '1,842 users', synced: 'live' },
  { id: 'azure-ad',  name: 'Azure AD',     cat: 'SSO & Identity',tone: '#0078d4', mono: 'Az',  status: 'available' },
  { id: 'google-ws', name: 'Google Workspace', cat: 'SSO & Identity', tone: '#ea4335', mono: 'Gw', status: 'available' },
  { id: 'whatsapp',  name: 'WhatsApp Business', cat: 'Messaging', tone: '#25d366', mono: 'Wa', status: 'connected', records: '342 chats', synced: '30s ago', highlight: true },
  { id: 'slack',     name: 'Slack',        cat: 'Messaging',     tone: '#611f69', mono: 'Sl',  status: 'available' },
  { id: 'webhook',   name: 'Webhook / REST', cat: 'Custom',      tone: '#6b6a64', mono: '{ }', status: 'connected', records: '3 endpoints', synced: 'live' },
  { id: 'graphql',   name: 'GraphQL endpoint', cat: 'Custom',    tone: '#e10098', mono: 'Gq',  status: 'available' },
];

const RECENT_QUERIES = [
  { who: 'Aditya P.',  q: 'Maverick spend in APAC last quarter', when: '2 min ago', vertical: 'procurement' },
  { who: 'Sari L.',    q: 'Velocity rule false positives this week', when: '14 min ago', vertical: 'fraud' },
  { who: 'Reza H.',    q: 'SOC 2 evidence — access review Q2',     when: '38 min ago', vertical: 'compliance' },
  { who: 'You',        q: 'Compare laptop unit prices across vendors', when: '1 hr ago', vertical: 'procurement' },
  { who: 'Dimas A.',   q: 'Engineering attrition by team — 90d',     when: '2 hr ago', vertical: 'hr' },
];

const SYNC_EVENTS = [
  { src: 'BigQuery',   msg: 'Schema sync completed — 4 new tables indexed', t: '12m', kind: 'ok' },
  { src: 'WhatsApp',   msg: 'New conversation thread ingested',             t: '2m',  kind: 'ok' },
  { src: 'Snowflake',  msg: 'Initial sync in progress — 62%',                t: 'now', kind: 'syncing' },
  { src: 'SharePoint', msg: '18 docs re-indexed after permission change',    t: '22m', kind: 'ok' },
  { src: 'Postgres',   msg: 'Slow query warning — fraud_alerts (3.2s)',      t: '1h',  kind: 'warn' },
];

window.NX_DATA = { VERTICALS, CONNECTORS, RECENT_QUERIES, SYNC_EVENTS };
