class InitialDetailsModelPopulator implements CompetitionSetupSectionModelPopulator<InitialDetailsViewModel> {

    @Override
    public InitialDetailsViewModel populateModel(GeneralSetupViewModel generalViewModel, CompetitionResource competitionResource) {
        return new InitialDetailsViewModel(generalViewModel,
                userRestService.findByUserRole(COMP_ADMIN).getSuccess(),
                categoryRestService.getInnovationSectors().getSuccess(),
                addAllInnovationAreaOption(categoryRestService.getInnovationAreas().getSuccess()),
                competitionRestService.getCompetitionTypes().getSuccess(),
                userRestService.findByUserRoleAndUserStatus(INNOVATION_LEAD, ACTIVE).getSuccess(),
                competitionSetupService.hasInitialDetailsBeenPreviouslySubmitted(competitionResource.getId()));
    }

}