import { Alert, Box, CircularProgress, Typography } from '@mui/material'
import { useNavigate } from 'react-router'
import { useNeedMatchesForProperty } from '../../hooks/useMatches'
import { useOfferWizardStore } from '../../stores/offerWizardStore'
import { NeedMatchCard } from './NeedMatchCard'
export function MatchabilityTabPanel({ propertyId }: { propertyId: string }) {
const navigate = useNavigate()
const setSelectedProperties = useOfferWizardStore(s => s.setSelectedProperties)
const { data: matches = [], isLoading: loading } = useNeedMatchesForProperty(propertyId, { minScore: 80 })
function handleNeedCardClick() {
setSelectedProperties([propertyId])
navigate('/supply/anfragen', { state: { tab: 1 } })
}
if (loading) {
return (
)
}
return (
Matchability
Bedarfsprofile mit ≥ 80% Match-Score — Karte klicken um Angebot zu erstellen
{matches.length === 0 ? (
Keine Bedarfsprofile mit ≥ 80% Match-Score für dieses Objekt gefunden.
) : (
matches.map(m => )
)}
)
}