import type { PipelineStage } from '../../domain/pipeline'
export { RESULT_TYPE_META } from '../../lib/ds'

// ── Stage config ──────────────────────────────────────────────────────────────

export const STAGES = [
  { key: 'SAVED' as PipelineStage,       label: 'Interessiert',  color: '#475569', bgColor: '#f8fafc' },
  { key: 'CONTACTED' as PipelineStage,   label: 'Angefragt',     color: '#0369a1', bgColor: '#f0f9ff' },
  { key: 'VISITED' as PipelineStage,     label: 'Besichtigt',    color: '#d97706', bgColor: '#fffbeb' },
  { key: 'NEGOTIATION' as PipelineStage, label: 'Verhandlung',   color: '#7c3aed', bgColor: '#faf5ff' },
  { key: 'CLOSED_WON' as PipelineStage,  label: 'Gewonnen',      color: '#1a7a4a', bgColor: '#f0fdf4' },
  { key: 'CLOSED_LOST' as PipelineStage, label: 'Abgelehnt',     color: '#c0392b', bgColor: '#fef2f2' },
] as const

export const NEXT_STAGE: Partial<Record<PipelineStage, { key: PipelineStage; label: string }>> = {
  SAVED:       { key: 'CONTACTED',   label: 'Anfrage senden' },
  CONTACTED:   { key: 'VISITED',     label: 'Besichtigung planen' },
  VISITED:     { key: 'NEGOTIATION', label: 'Verhandlung starten' },
  NEGOTIATION: { key: 'CLOSED_WON', label: 'Als gewonnen markieren' },
}

export const MOCK_DOCS: Record<string, { name: string; date: string }[]> = {
  'pl-001': [
    { name: 'Expose_Zollstrasse12.pdf',    date: '05.05.2026' },
    { name: 'Grundriss_EG.pdf',            date: '08.05.2026' },
    { name: 'Mietvertrag_Entwurf.docx',    date: '14.05.2026' },
  ],
  'pl-007': [
    { name: 'Expose_Stadthaus_Bern.pdf',         date: '12.04.2026' },
    { name: 'Mietvertrag_unterschrieben.pdf',     date: '02.05.2026' },
  ],
}
