import { ConfirmModal } from '@/components/ui/ConfirmModal' import { useDeletePlant, type Plant } from '@/lib/plants' /** * Confirmation dialog for deleting a custom plant. A plant still used by * plantings is refused by the server (409 PLANT_IN_USE); ConfirmModal surfaces * that message inline rather than pretending it worked. */ export function DeletePlantModal({ plant, onClose }: { plant: Plant; onClose: () => void }) { const deletion = useDeletePlant() return ( deletion.mutateAsync(plant.id)} onClose={onClose} >

Delete {plant.name} from your catalog? This can't be undone.

) }