// lib/process/status-tokens.js — UI presentation tokens for case + execution
// statuses, plus the engine's terminal-state sets. Source-of-truth for both
// server code (engine.js) and client components (case-detail-client.jsx) so
// the UI bundle doesn't pull in the engine just to check terminal status.

export const STATUS_TONES = {
  intake: 'neutral',
  running: 'info',
  awaiting_approval: 'warning',
  complete: 'success',
  rejected: 'danger',
  failed: 'danger',
  cancelled: 'neutral',
};

export const STATUS_LABELS = {
  intake: 'Intake',
  running: 'Running',
  awaiting_approval: 'Awaiting approval',
  complete: 'Complete',
  rejected: 'Rejected',
  failed: 'Failed',
  cancelled: 'Cancelled',
};

export const EXEC_STATUS_TONES = {
  queued: 'neutral',
  running: 'info',
  awaiting_approval: 'warning',
  pass: 'success',
  fail: 'danger',
  skipped: 'neutral',
  cancelled: 'neutral',
};

export const TERMINAL_CASE_STATES = new Set(['complete', 'rejected', 'failed', 'cancelled']);
export const TERMINAL_EXECUTION_STATES = new Set(['pass', 'fail', 'skipped', 'cancelled']);
