import { Bed, MapPin } from 'lucide-react'; import type { PropertyProperties } from '@/types'; interface PropertyCardCompactProps { property: PropertyProperties; isActive?: boolean; isHighlighted?: boolean; avgPricePerSqm?: number; onClick?: () => void; } export function PropertyCardCompact({ property, isActive = false, isHighlighted = false, avgPricePerSqm, onClick, }: PropertyCardCompactProps) { const isGoodDeal = avgPricePerSqm && property.qmprice > 0 && property.qmprice < avgPricePerSqm * 0.9; const isExpensive = avgPricePerSqm && property.qmprice > avgPricePerSqm * 1.1; const priceIndicator = isGoodDeal ? { dotColor: 'bg-[var(--deal-good)]', label: 'Good deal' } : isExpensive ? { dotColor: 'bg-[var(--deal-above)]', label: 'Above avg' } : null; return (
{/* Thumbnail with 4:3 aspect ratio */}
{property.photo_thumbnail && ( {`${property.rooms}-bed, )}
{/* Details */}
{/* Price bold */}
£{property.total_price.toLocaleString()} {property.listing_type !== 'BUY' && ( /mo )} {priceIndicator && ( )}
{/* Beds and size */}
{property.rooms} bed · {property.qm} m²
{/* Location */} {property.city && (
{property.city}
)}
); }