import { Event, Participant } from "@repo/db";

export const eventCompleted = (event: Event, participant?: Participant) => {
	if (!participant) return false;
	if (event.finisherMoodleCourseId && !participant.finisherMoodleCurseCompleted) return false;
	if (event.hasPresenceEvents && !participant.attended) return false;
	return true;
};
