export const API_BASE = '/api/admin/consent'

export type Tab = 'documents' | 'versions' | 'emails' | 'gdpr' | 'stats' | 'deadlines' | 'integrations'

export interface Document {
  id: string
  type: string
  name: string
  description: string
  mandatory: boolean
  created_at: string
  updated_at: string
}

export interface Version {
  published_at?: string
  id: string
  document_id: string
  version: string
  language: string
  title: string
  content: string
  status: string
  created_at: string
}

// Email template editor types
export interface EmailTemplateData {
  key: string
  subject: string
  body: string
}

export interface ApiEmailTemplate {
  id: string
  template_key: string
  subject: string
  body: string
  language: string
  is_active: boolean
}

export interface ApiGdprProcess {
  id: string
  process_key: string
  title: string
  description: string
  legal_basis: string
  retention_days: number
  is_active: boolean
}

export interface ConsentStats {
  activeConsents: number
  documentCount: number
  openDSRs: number
}

export interface DsrOverview {
  open: number
  completed: number
  in_progress: number
  overdue: number
}
