import { useMutation, useQueryClient } from '@tanstack/react-query'
import { reactivateSeccion } from '../api/reactivateSeccion'

export function useReactivateSeccion() {
  const queryClient = useQueryClient()
  return useMutation({
    mutationFn: (id: number) => reactivateSeccion(id),
    onSuccess: () => {
      queryClient.invalidateQueries({ queryKey: ['secciones'] })
    },
  })
}
