// ==========================================
// FORM TYPES
// ==========================================

import type { LocalizedText, ResponsibleParty, Contact, Address } from './common'
import type {
  DataSubjectCategory,
  PersonalDataCategory,
  ProtectionLevel,
  VendorRole,
  ServiceCategory,
  DataAccessLevel,
  TransferMechanismType,
  DocumentType,
  ReviewFrequency,
} from './enums'
import type {
  LegalBasis,
  RecipientCategory,
  ThirdCountryTransfer,
  RetentionPeriod,
  DataSource,
  SystemReference,
  DataFlow,
} from './vvt-interfaces'
import type { ProcessingLocation, Certification } from './vendor-interfaces'

export interface ProcessingActivityFormData {
  vvtId: string
  name: LocalizedText
  responsible: ResponsibleParty
  dpoContact?: Contact
  purposes: LocalizedText[]
  dataSubjectCategories: DataSubjectCategory[]
  personalDataCategories: PersonalDataCategory[]
  recipientCategories: RecipientCategory[]
  thirdCountryTransfers: ThirdCountryTransfer[]
  retentionPeriod: RetentionPeriod
  technicalMeasures: string[]
  legalBasis: LegalBasis[]
  dataSources: DataSource[]
  systems: SystemReference[]
  dataFlows: DataFlow[]
  protectionLevel: ProtectionLevel
  dpiaRequired: boolean
  dpiaJustification?: string
  subProcessors: string[]
  owner: string
}

export interface VendorFormData {
  name: string
  legalForm?: string
  country: string
  address: Address
  website?: string
  role: VendorRole
  serviceDescription: string
  serviceCategory: ServiceCategory
  dataAccessLevel: DataAccessLevel
  processingLocations: ProcessingLocation[]
  transferMechanisms: TransferMechanismType[]
  certifications: Certification[]
  primaryContact: Contact
  dpoContact?: Contact
  securityContact?: Contact
  contractTypes: DocumentType[]
  reviewFrequency: ReviewFrequency
  notes?: string
}

export interface ContractUploadData {
  vendorId: string
  documentType: DocumentType
  version: string
  effectiveDate?: Date
  expirationDate?: Date
  autoRenewal?: boolean
}
