/**
 * Main Fixtures Index
 * Exports all test fixtures for the security benchmark suite
 */

// Layer 1 fixtures
export * from './layer1'
export { layer1TestGroups, highEntropyTests } from './layer1'

// Layer 2 fixtures
export * from './layer2'
export { layer2TestGroups } from './layer2'

// False positive fixtures
export { falsePositiveFixtures } from './false-positives'
export {
  testFileFixture,
  exampleFileFixture,
  configFileFixture,
  middlewareFileFixture,
  protectedApiRouteFixture,
  documentationFixture,
} from './false-positives'

import type { TestGroup, TestFixture } from '../types'
import { layer1TestGroups, highEntropyTests } from './layer1'
import { layer2TestGroups } from './layer2'
import { falsePositiveFixtures } from './false-positives'

/**
 * All test groups organized by layer and tier
 */
export const allTestGroups: TestGroup[] = [
  ...layer1TestGroups,
  highEntropyTests,
  ...layer2TestGroups,
]

/**
 * Get all true positive fixtures
 */
export function getAllTruePositives(): TestFixture[] {
  return allTestGroups.flatMap(group => group.truePositives)
}

/**
 * Get all false negative fixtures
 */
export function getAllFalseNegatives(): TestFixture[] {
  return [
    ...allTestGroups.flatMap(group => group.falseNegatives),
    ...falsePositiveFixtures,
  ]
}

/**
 * Get test groups by layer
 */
export function getTestGroupsByLayer(layer: 1 | 2): TestGroup[] {
  return allTestGroups.filter(group => group.layer === layer)
}

/**
 * Get test groups by tier
 */
export function getTestGroupsByTier(tier: 'A' | 'B' | 'C'): TestGroup[] {
  return allTestGroups.filter(group => group.tier === tier)
}
