class InviteAssessorsController extends CompetitionManagementCookieController<AssessorSelectionForm> {

    @GetMapping("/invite")
    public String invite(Model model,
                         @PathVariable("competitionId") long competitionId,
                         @ModelAttribute(name = FORM_ATTR_NAME, binding = false) InviteNewAssessorsForm form,
                         @RequestParam(defaultValue = "0") int page) {
        if (form.getInvites().isEmpty()) {
            form.getInvites().add(new InviteNewAssessorsRowForm());
        }

        model.addAttribute("model", inviteAssessorsInviteModelPopulator.populateModel(competitionId, page));

        return "assessors/invite";
    }

}