import { Briefcase, BarChart2, FileCheck, FileText, User, ShieldCheck, Newspaper } from 'lucide-react'

export function floorLabel(level: number): string {
  if (level === 0) return 'EG'
  if (level < 0) return `UG ${Math.abs(level)}`
  return `${level}.OG`
}

export const SOURCE_META: Record<string, { label: string; icon: React.ReactNode }> = {
  JOB_POSTING:        { label: 'Stelleninserate',    icon: <Briefcase size={11} /> },
  PRESS:              { label: 'Pressebericht',       icon: <Newspaper size={11} /> },
  CONSTRUCTION_PERMIT:{ label: 'Baubewilligung',      icon: <FileCheck size={11} /> },
  COMPANY_REPORT:     { label: 'Geschäftsbericht',    icon: <FileText size={11} /> },
  MARKET_DATA:        { label: 'Marktdaten',          icon: <BarChart2 size={11} /> },
  MANUAL:             { label: 'Analyst',             icon: <User size={11} /> },
  LEASE_CONTRACT:     { label: 'Vertrag verifiziert', icon: <ShieldCheck size={11} /> },
}

export const ASSET_TYPE_LABELS: Record<string, string> = {
  OFFICE: 'Bürofläche',
  LOGISTICS: 'Lagerfläche',
  RETAIL: 'Retailfläche',
  PRODUCTION: 'Produktionsfläche',
  MIXED: 'Gewerbefläche',
}

export function getOpportunityHeadline(signalType: string | undefined, assetTypeLabel: string): string {
  switch (signalType) {
    case 'LEASE_EXPIRY': return `${assetTypeLabel} wird verfügbar`
    case 'POSSIBLE_MOVE_OUT': return `Mögliche ${assetTypeLabel} erkannt`
    case 'EXPANSION': return `Unternehmen sucht ${assetTypeLabel}`
    case 'CONSTRUCTION_PROJECT': return `Neubau: ${assetTypeLabel} in Planung`
    case 'RESTRUCTURING': return `Mögliche Flächenfreigabe erkannt`
    case 'SPACE_CONSOLIDATION': return `Mögliche Teilfläche erkannt`
    case 'PROJECT_DEVELOPMENT': return `Neue Fläche in Projektentwicklung`
    default: return `Potenzielle ${assetTypeLabel} erkannt`
  }
}
