import { Box, Card, Chip, Stack, Typography } from '@mui/material'
import { MapPin, Ruler, Wallet, Calendar, CheckCircle } from 'lucide-react'
import type { PropertyNeedMatch } from '../../domain/match'
import { DS_TEXT, DS_BG, DS_SURFACE, DS_BORDER } from '../../lib/ds'
interface Props {
match: PropertyNeedMatch
onClick?: () => void
}
function ScoreBadge({ score }: { score: number }) {
const isGold = score >= 90
const bg = isGold ? DS_SURFACE.warning.bg : DS_BG.subtle
const color = isGold ? DS_TEXT.warning : DS_TEXT.muted
const borderColor = isGold ? DS_SURFACE.warning.border : DS_BORDER.default
return (
{score}
)
}
function InfoRow({ icon, label, value }: { icon: React.ReactNode; label: string; value: string }) {
return (
{icon}
{label}
{value}
)
}
export function NeedMatchCard({ match, onClick }: Props) {
return (
{match.company}
= 90 ? 'Gold Match' : 'Starker Match'}
size="small"
sx={{
fontSize: '0.65rem',
height: 18,
bgcolor: match.score >= 90 ? DS_SURFACE.warning.bg : DS_BG.subtle,
color: match.score >= 90 ? DS_TEXT.warningDark : DS_TEXT.secondary,
border: '1px solid',
borderColor: match.score >= 90 ? DS_SURFACE.warning.border : DS_BORDER.default,
}}
/>
} label="Fläche" value={match.areaRequired} />
} label="Budget" value={match.budget} />
}
label="Standorte"
value={match.locations.slice(0, 3).join(', ') + (match.locations.length > 3 ? ' …' : '')}
/>
} label="Einzug ab" value={match.timing} />
{match.matchHighlights.length > 0 && (
{match.matchHighlights.slice(0, 2).map((h, i) => (
{h}
))}
)}
{match.mustHaves.length > 0 && (
{match.mustHaves.slice(0, 3).map(mh => (
))}
{match.mustHaves.length > 3 && (
+{match.mustHaves.length - 3}
)}
)}
)
}