public function handleApplicantCreation(ClientSurvey $client_survey, array $emails, int $current_offline_count, int $offline_applicants_count, int $online_applicants_count, ?string $single_code = null, ?array $email_languages = []): void 	{ 		foreach (array_diff($emails, $client_survey->applicants()->fillingOnlineSurvey()->pluck('email')->all()) as $email) { 			$code = $single_code ?? Applicant::generateCode();  			$client_survey->applicants()->create([ 				'email' => $email, 				'code' => $code, 				'control_number' => Applicant::generateControlNumber(), 				'default_language' => $email_languages[$email] ?? $client_survey->client->default_language, 			]); 		}  		$current_online_count = $client_survey->applicants()->fillingOnlineSurvey()->count();  		if ($current_online_count < $online_applicants_count) { // If survey current online applicant count is lower than needed, generate extra 			for ($i = 0; $i < $online_applicants_count - $current_online_count; $i++) { 				$code = $single_code ?? Applicant::generateCode();  				$client_survey->applicants()->create([ 					'code' => $code, 					'control_number' => Applicant::generateControlNumber(), 					'default_language' => $client_survey->client->default_language, 				]); 			} 		}  		if ($current_offline_count < $offline_applicants_count) { // If survey current offline applicant count is lower than needed, generate extra 			for ($i = 0; $i < $offline_applicants_count - $current_offline_count; $i++) { 				$code = $single_code ?? Applicant::generateCode();  				$client_survey->applicants()->create([ 					'is_offline' => true, 					'code' => $code, 					'control_number' => Applicant::generateControlNumber(), 				]); 			} 		} 	}