/**
 * TypeScript type definitions for infrastructure documentation
 */

export type Region = 'Africa (Sub-Saharan)' | 'Middle East & North Africa' | 'Americas' | 'Asia-Pacific' | 'Europe'
export type RelationshipType = 'Full Diplomatic Relations' | 'Official (Non-Diplomatic)' | 'Ambassador Level' | 'Full Diplomatic Relations (Special Mission)'
export type Priority = 'Critical' | 'High' | 'Medium' | 'Low'
export type ComplianceStatus = 'Compliant' | 'Partial' | 'Pending' | 'Non-Compliant'
export type DeploymentStatus = 'Planned' | 'In Progress' | 'Complete' | 'Blocked'
export type CostCategory = 'Infrastructure' | 'Network' | 'Compliance' | 'Operations'
export type TopologyNodeType = 'region' | 'datacenter' | 'tunnel' | 'vm' | 'service'
export type TopologyEdgeType = 'tunnel' | 'peering' | 'network-route'

export interface Country {
  name: string
  region: Region
  relationshipType: RelationshipType
  priority: Priority
  cloudflareCoverage: boolean
  networkInfrastructurePriority: string
  notes?: string
  coordinates?: { lat: number; lng: number }
}

export interface TopologyNode {
  id: string
  type: TopologyNodeType
  label: string
  region: string
  entity: string
  position: { x: number; y: number }
  metadata: Record<string, any>
}

export interface TopologyEdge {
  id: string
  source: string
  target: string
  type: TopologyEdgeType
  metadata: Record<string, any>
}

export interface NetworkTopology {
  nodes: TopologyNode[]
  edges: TopologyEdge[]
  region: string
  entity: string
  lastUpdated: string
}

export interface ComplianceRequirement {
  country: string
  region: Region
  frameworks: string[]
  status: ComplianceStatus
  requirements: string[]
  lastAuditDate?: string
  notes?: string
}

export interface DeploymentMilestone {
  id: string
  title: string
  region: string
  entity: string
  priority: Priority
  startDate: string
  endDate: string
  status: DeploymentStatus
  dependencies?: string[]
  cost?: number
  description?: string
}

export interface CostEstimate {
  region: string
  entity: string
  category: CostCategory
  monthly: number
  annual: number
  breakdown: {
    compute?: number
    storage?: number
    network?: number
    licenses?: number
    personnel?: number
  }
  currency?: string
  lastUpdated?: string
}

export interface InfrastructureSummary {
  totalCountries: number
  totalRegions: number
  totalCost: number
  deploymentProgress: {
    planned: number
    inProgress: number
    complete: number
    blocked: number
  }
}

