export type PipelineStage = 'SAVED' | 'CONTACTED' | 'VISITED' | 'NEGOTIATION' | 'CLOSED_WON' | 'CLOSED_LOST'

export interface PipelineItem {
  id: string
  title: string
  location: string
  matchScore: number
  resultType: 'VERIFIED_PORTFOLIO' | 'MAISON_WORK' | 'FUTURE_AVAILABILITY'
  stage: PipelineStage
  // Source match reference — used for navigating back to the detail page
  matchId?: string
  // Property / unit reference — always set for unit-level tracking
  propertyId?: string
  unitId?: string
  propertyAddress?: string
  // Linked inquiry (chat thread)
  inquiryId?: string
  // Display labels
  areaLabel?: string
  rentLabel?: string
  availabilityLabel?: string
  addedAt: string
  updatedAt: string
  notes?: string
  assignedTo?: string
}

export interface PendingPipelineItem {
  resultId: string
  resultType: PipelineItem['resultType']
  title: string
  location?: string
  matchScore: number
  propertyId?: string
  unitId?: string
  propertyAddress?: string
  areaLabel?: string
  rentLabel?: string
  availabilityLabel?: string
}
