import { useQuery } from '@tanstack/react-query';
import { wagonTypesService } from '@/services/wagon-types.service';

export const WAGON_TYPES_QUERY_KEY = ['wagon-types'];

export function useWagonTypes() {
  return useQuery({
    queryKey: WAGON_TYPES_QUERY_KEY,
    queryFn: () => wagonTypesService.getWagonTypes(),
    staleTime: Infinity,
  });
}