export interface RouteDefinition {
  id: string
  name: string
  group: string
  description: string
  exchangeCount: number
  successRate: number
  avgDurationMs: number
  p99DurationMs: number
  status: 'healthy' | 'degraded' | 'down'
  processors: string[]
}

export const routes: RouteDefinition[] = [
  {
    id: 'order-intake',
    name: 'order-intake',
    group: 'order-flow',
    description: 'Ingests new orders from JMS queue, validates schema, enriches with customer data',
    exchangeCount: 892,
    successRate: 99.2,
    avgDurationMs: 88,
    p99DurationMs: 142,
    status: 'healthy',
    processors: ['from(jms:orders)', 'unmarshal(json)', 'validate(schema)', 'enrich(customer-db)', 'to(order-enrichment)'],
  },
  {
    id: 'order-enrichment',
    name: 'order-enrichment',
    group: 'order-flow',
    description: 'Enriches order with inventory availability, pricing, and shipment options',
    exchangeCount: 541,
    successRate: 97.6,
    avgDurationMs: 156,
    p99DurationMs: 287,
    status: 'degraded',
    processors: ['from(jms:orders-enriched)', 'enrich(inventory-api)', 'enrich(pricing-service)', 'to(payment-process)'],
  },
  {
    id: 'payment-process',
    name: 'payment-process',
    group: 'payment-flow',
    description: 'Processes payment through gateway, handles retries and partial failures',
    exchangeCount: 414,
    successRate: 96.1,
    avgDurationMs: 234,
    p99DurationMs: 412,
    status: 'degraded',
    processors: ['from(jms:payments)', 'validate(payment-schema)', 'to(payment-gateway)', 'to(order-service)'],
  },
  {
    id: 'payment-validate',
    name: 'payment-validate',
    group: 'payment-flow',
    description: 'Validates payment details and performs fraud check before processing',
    exchangeCount: 498,
    successRate: 99.8,
    avgDurationMs: 142,
    p99DurationMs: 198,
    status: 'healthy',
    processors: ['from(jms:payments)', 'validate(payment-schema)', 'check(fraud-service)', 'to(payment-process)'],
  },
  {
    id: 'shipment-dispatch',
    name: 'shipment-dispatch',
    group: 'shipment-flow',
    description: 'Dispatches shipment to carrier after order confirmation',
    exchangeCount: 387,
    successRate: 98.4,
    avgDurationMs: 118,
    p99DurationMs: 248,
    status: 'healthy',
    processors: ['from(jms:shipments)', 'unmarshal(json)', 'enrich(carrier-api)', 'to(carrier-gateway)'],
  },
  {
    id: 'shipment-track',
    name: 'shipment-track',
    group: 'shipment-flow',
    description: 'Polls carrier APIs for shipment status updates and notifies customers',
    exchangeCount: 923,
    successRate: 99.5,
    avgDurationMs: 94,
    p99DurationMs: 167,
    status: 'healthy',
    processors: ['from(jms:tracking)', 'enrich(carrier-api)', 'to(notification-hub)'],
  },
  {
    id: 'notification-dispatch',
    name: 'notification-dispatch',
    group: 'notification-flow',
    description: 'Sends email and SMS notifications to customers for order events',
    exchangeCount: 471,
    successRate: 98.9,
    avgDurationMs: 62,
    p99DurationMs: 124,
    status: 'healthy',
    processors: ['from(jms:notifications)', 'route(by-type)', 'to(smtp)', 'to(sms-gateway)'],
  },
]
