import { Box, Chip, Paper, Typography } from '@mui/material' import { Banknote, Calendar, HardHat, 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 ?? '–' }, ...(property?.hardFacts?.fitOut ? [{ icon: , label: 'Ausbaustandard', value: (() => { const LABELS: Record = { SHELL: 'Rohbau', BASIC: 'Basisausbau', FULL: 'Vollausbau', PREMIUM: 'Premiumausbau' } const base = LABELS[property.hardFacts!.fitOut!] ?? property.hardFacts!.fitOut! const mab = property.hardFacts!.mieterausbaubeitragPerSqm return mab ? `${base} + CHF ${mab}/m² MAB` : base })(), }] : []), ] return ( {isFuture ? 'Signal-Übersicht' : 'Objekt-Übersicht'} {property?.status && ( )} {rows.map((row, i) => ( ))} {property?.description && ( {property.description} )} ) }