import { kbxTestScenarioCatalog } from '@kbx/contracts'

export function requireKbxScenario(id: keyof typeof kbxTestScenarioCatalog) {
  const scenario = kbxTestScenarioCatalog[id]
  if (!scenario) throw new Error(`Unknown KBX scenario: ${String(id)}`)
  return scenario
}

export function scenarioTitle(id: keyof typeof kbxTestScenarioCatalog) {
  const s = requireKbxScenario(id)
  return `[${s.id}] ${s.title}`
}
