import { Box, CircularProgress, Typography } from '@mui/material' import { Sparkles } from 'lucide-react' import { usePublicNeeds } from '../../hooks/useLatentNeeds' import { PublicNeedCard } from './PublicNeedCard' import { EmptyState } from '../ui' interface PublicNeedListProps { selectedNeedId: string | null onSelect: (id: string) => void fullWidth?: boolean } export function PublicNeedList({ selectedNeedId, onSelect, fullWidth }: PublicNeedListProps) { const { data: needs = [], isLoading, error } = usePublicNeeds() return ( Latente Bedarfe {needs.length} {isLoading && ( )} {error && ( Fehler beim Laden )} {!isLoading && needs.length === 0 && ( )} {needs.map(n => ( onSelect(n.id)} /> ))} ) }