'use client';

import { useQuery } from '@tanstack/react-query';
import { useServices } from '@/lib/services/ServiceProvider';
import type { PenaltyTypesReferenceDTO } from '@/lib/types/PenaltyTypesReferenceDTO';

export function usePenaltyTypesReference() {
  const { penaltyService } = useServices();

  return useQuery<PenaltyTypesReferenceDTO>({
    queryKey: ['penaltyTypesReference'],
    queryFn: () => penaltyService.getPenaltyTypesReference(),
    staleTime: 5 * 60 * 1000,
  });
}