import { useQuery } from '@tanstack/react-query'
import { marketReportService } from '../services/marketReportService'

export function useMarketReport(propertyId: string | null) {
  return useQuery({
    queryKey: ['market-report', propertyId],
    queryFn: () => marketReportService.getByProperty(propertyId!),
    enabled: !!propertyId,
  })
}
