import { Box, Chip, Paper, Typography } from '@mui/material'
import { Banknote, Calendar, MapPin, Maximize2, Tag } from 'lucide-react'
import type { Match } from '../../domain/match'
import type { Property } from '../../domain/property'
import type { FutureSignal } from '../../domain/futureSignal'
interface FactRowProps {
icon: React.ReactNode
label: string
value: string
}
function FactRow({ icon, label, value }: FactRowProps) {
return (
{icon}
{label}
{value}
)
}
interface Props {
match: Match
property: Property | null
signal: FutureSignal | null
}
export function PropertyOverviewPanel({ match, property, signal }: Props) {
if (!property && !signal) return null
const isFuture = match.resultType === 'FUTURE_AVAILABILITY'
const rows: FactRowProps[] = isFuture ? [
{ icon: , label: 'Standorthinweis', value: signal?.locationHint ?? '–' },
{ icon: , label: 'Flächenschätzung', value: signal?.areaSqmEstimate ? `~${signal.areaSqmEstimate} m²` : 'unbekannt' },
{ icon: , label: 'Zeithorizont', value: signal?.timeHorizonMonths ? `~${signal.timeHorizonMonths} Monate` : '–' },
{ icon: , label: 'Wahrscheinlichkeit', value: signal?.probability ? `${Math.round(signal.probability * 100)}%` : '–' },
] : [
{ icon: , label: 'Standort', value: property ? `${property.location.city}${property.location.district ? `, ${property.location.district}` : ''}` : '–' },
{ icon: , label: 'Nutzfläche', value: property ? `${property.areaSqm} m²` : '–' },
{ icon: , label: 'Mietpreis', value: property?.rentPricePerSqm ? `CHF ${property.rentPricePerSqm}/m²/Jahr` : '–' },
{ icon: , label: 'Verfügbar ab', value: property?.availabilityDate ?? '–' },
{ icon: , label: 'Objekttyp', value: property?.assetType ?? '–' },
]
return (
{isFuture ? 'Signal-Übersicht' : 'Objekt-Übersicht'}
{property?.status && (
)}
{rows.map((row, i) => (
))}
{property?.description && (
{property.description}
)}
)
}