public function generateApplicants(?array $emails = [], ?int $offline_applicants_count = 0, ?array $email_languages = []): void 	{ 		$client_survey_service = new ClientSurveyService;  		$single_code = !$this->multiple_access_codes ? ($this->applicants()->exists() ? $this->applicants()->first()->code : Applicant::generateCode()) : null; 		$offline_applicants_count = $this->offline_applicants_count; 		$online_applicants_count = $this->online_applicants_count;  		$current_offline_count = $current_online_count = 0;  		if ($this->applicants()->exists()) { 			$all_applicants = $this->applicants;  			$current_offline_count = $all_applicants->where('is_offline', true)->count();  			$current_online_count = $all_applicants->where('is_offline', false)->count();  			$client_survey_service->handleApplicantDeletion($this, $emails ?? [], $current_offline_count, $offline_applicants_count, $current_online_count, $online_applicants_count);  			$current_offline_count = $this->applicants()->fillingOfflineSurvey()->count(); 		}  		$client_survey_service->handleApplicantCreation($this, $emails ?? [], $current_offline_count, $offline_applicants_count, $online_applicants_count, $single_code, $email_languages);  		$client_survey_service->handleApplicantCodesIfMultipleCodesBooleanChanged($this, $single_code); 	}