/**
 * SDK flow, navigation, coverage assessment, and package definitions.
 *
 * The SDK_STEPS array lives in ./sdk-steps.ts to keep both files under 500 LOC.
 */

import type { SDKPackageId } from './enums'
import type { SDKState } from './sdk-state'

// =============================================================================
// SDK COVERAGE
// =============================================================================

export interface SDKCoverageAssessment {
  isFullyCovered: boolean
  coveredRegulations: string[]
  partiallyCoveredRegulations: string[]
  notCoveredRegulations: string[]
  requiresLegalCounsel: boolean
  reasons: string[]
  recommendations: string[]
}

// =============================================================================
// SDK PACKAGES
// =============================================================================

export interface SDKPackage {
  id: SDKPackageId
  order: number
  name: string
  nameShort: string
  description: string
  icon: string
  result: string
}

export const SDK_PACKAGES: SDKPackage[] = [
  {
    id: 'vorbereitung',
    order: 1,
    name: 'Vorbereitung',
    nameShort: 'Vorbereitung',
    description: 'Grundlagen erfassen, Ausgangssituation verstehen',
    icon: '\uD83C\uDFAF',
    result: 'Klares Verst\u00e4ndnis, welche Regulierungen greifen',
  },
  {
    id: 'analyse',
    order: 2,
    name: 'Analyse',
    nameShort: 'Analyse',
    description: 'Risiken erkennen, Anforderungen ableiten',
    icon: '\uD83D\uDD0D',
    result: 'Vollst\u00e4ndige Risikobewertung, Audit-Ready',
  },
  {
    id: 'dokumentation',
    order: 3,
    name: 'Dokumentation',
    nameShort: 'Doku',
    description: 'Rechtliche Pflichtnachweise erstellen',
    icon: '\uD83D\uDCCB',
    result: 'DSFA, TOMs, VVT, L\u00f6schkonzept',
  },
  {
    id: 'rechtliche-texte',
    order: 4,
    name: 'Rechtliche Texte',
    nameShort: 'Legal',
    description: 'Kundenf\u00e4hige Dokumente generieren',
    icon: '\uD83D\uDCDD',
    result: 'AGB, DSI, Nutzungsbedingungen, Cookie-Banner (Code)',
  },
  {
    id: 'betrieb',
    order: 5,
    name: 'Betrieb',
    nameShort: 'Betrieb',
    description: 'Laufender Compliance-Betrieb',
    icon: '\u2699\uFE0F',
    result: 'DSR-Portal, Eskalationsprozesse, Vendor-Management',
  },
]

// =============================================================================
// SDK STEP (interface only — data in sdk-steps.ts)
// =============================================================================

export interface SDKStep {
  id: string
  seq: number
  phase: 1 | 2
  package: SDKPackageId
  order: number
  name: string
  nameShort: string
  description: string
  url: string
  checkpointId: string
  prerequisiteSteps: string[]
  isOptional: boolean
  visibleWhen?: (state: SDKState) => boolean
}
