import { updateTournament } from "@/features/tournaments/server";
import { TournamentInput } from "@/features/tournaments/types";
import { useServerMutation } from "@/lib/tanstack-query/hooks";

const useUpdateTournament = (tournamentId: string) => {
  return useServerMutation({
    mutationFn: (data: Partial<TournamentInput>) => 
      updateTournament({ data: { id: tournamentId, updates: data } }),
  });
};

export default useUpdateTournament;