public function store(Domain $domain, StoreClientSurveyAPI $request, ClientSurveyService $client_survey_service): JsonResource 	{ 		$this->validate($request, [ 			'type' => ['required', 'integer', new Enum(SurveyType::class)], 		]);  		$client = $request->user()->user;  		if ($client_survey_service->checkForPuls($client, $request)) { 			abort(403, 'Cannot create a PULS survey before IZZ survey is done'); 		}  		if ($client->surveys()->count() > 1) { 			$client->sendOldClientLoginMail(); 		}  		$survey = $client_survey_service->createClientSurvey($request, $client);  		$client_survey_service->handleExtraAndDemographicQuestions($request, $survey);  		$survey->generateApplicants($request->emails, $request->offline_applicants_count, $request->email_languages);  		$client_survey_service->handleQuestionScrambling($survey);  		// Schedule webhooks | Won't schedule if testing 		$client_survey_notification_service = new ClientSurveyNotificationService; 		$client_survey_service->handleLocationsAndDepartmentCreation($request, $survey); 		$client_survey_notification_service->handleWebhooks($survey);  		if (!$survey->draft) { 			$client_survey_service->changeSurveyToPending($survey); 		}  		$survey->load([ 			'locations', 			'departments', 			'extraQuestions', 			'demographicQuestions', 			'applicants' => function ($query) { 				$query->fillingOnlineSurvey()->mailable(); 			}, 		]);  		$userActivityService = new UserActivityService($request); 		$userActivityService->createCustomEntry($survey, UserActivityType::Create);  		return new ClientSurveyResourceSingle($survey); 	}