import { memo } from 'react' import { Box, Button, Chip, LinearProgress, Typography } from '@mui/material' import { LocationPreview } from '../shared/LocationPreview' import { getAssetTypeColor, getAssetTypeLabel, getAvailabilityLabel } from './propertyHelpers' import type { Property } from '../../domain/property' interface Props { property: Property onSelect: (id: string) => void } function availabilityBadgeColor(status: string): string { if (status === 'AVAILABLE_NOW') return '#1a7a4a' if (status === 'AVAILABLE_SOON') return '#d97706' return '#64748b' } export const PropertyIntelligenceCard = memo(function PropertyIntelligenceCard({ property: p, onSelect }: Props) { const confPct = Math.round(p.confidenceScore * 100) const confColor = p.confidenceScore >= 0.75 ? '#1a7a4a' : p.confidenceScore >= 0.55 ? '#d97706' : '#c0392b' return ( onSelect(p.id)} > {/* Image zone */} {/* Availability badge */} {/* Asset type chip */} {/* Card body */} {p.title} {p.location.city}{p.location.district ? ` · ${p.location.district}` : ''} {/* Key specs */} {p.contractDurationMonths && ( )} {/* Soft factors */} {p.softFactors && ( {p.softFactors.prestige != null && ( )} {p.softFactors.accessibility != null && ( )} )} {/* Confidence */} Datenkonfidenz {confPct}% ) })