class InterviewApplicationSendInviteController {

    @PostMapping(value = "/send", params = {"removeFeedbackApplicationId"})
    public String removeFeedback(Model model,
                                 @PathVariable("competitionId") long competitionId,
                                 @ModelAttribute("form") InterviewApplicationSendForm form,
                                 BindingResult bindingResult,
                                 ValidationHandler validationHandler) {

        Supplier<String> failureAndSuccessView = () -> getInvitesToSend(model, competitionId, form.getPage(), form, bindingResult);

        RestResult<Void> sendResult = interviewAssignmentRestService
                .deleteFeedback(form.getRemoveFeedbackApplicationId());

        return validationHandler.addAnyErrors(error(removeDuplicates(sendResult.getErrors())))
                .failNowOrSucceedWith(failureAndSuccessView, failureAndSuccessView);
    }

    @Autowired public  InterviewApplicationSendInviteController(InterviewApplicationsSendModelPopulator interviewApplicationsSendModelPopulator,
                                                    InterviewApplicationSentInviteModelPopulator interviewApplicationSentInviteModelPopulator,
                                                    InterviewAssignmentRestService interviewAssignmentRestService);

}