+export const getRunners = tournament => {
+ if (!tournament || !tournament.participants || !tournament.participants.length) return [];
+ return tournament.participants
+ .filter(Participant.isRunner)
+ .sort(Participant.compareUsername);
+};
+
+export const getTournamentAdmins = tournament => {
+ if (!tournament || !tournament.participants || !tournament.participants.length) return [];
+ return tournament.participants
+ .filter(Participant.isTournamentAdmin)
+ .sort(Participant.compareUsername);
+};
+
+export const hasRunners = tournament => {
+ return getRunners(tournament).length > 0;
+};
+
+export const hasTournamentAdmins = tournament => {
+ return getTournamentAdmins(tournament).length > 0;
+};
+