public function storeEmailTemplates(StoreClientSurveyEmailTemplate $request, ClientSurvey $id): RedirectResponse 	{ 		$emailTemplate = new EmailTemplate;  		$id->handleApplicantAndClientEmailTemplates(function ($language, $type) use ($request, $id, $emailTemplate) { 			$content = $request[$type->name() . '_email_' . $language];  			$content = !is_null($content) ? $emailTemplate->replacePlaceholdersInEmail($id, $type, $language, $content) : null;  			$id->emailTemplates()->updateOrCreate([ 				'type' => $type->value, 			], [ 				'type' => $type->value, 				'content' => [ 					$language => $content, 				], 				'subject' => [ 					$language => $request[$type->name() . '_subject_' . $language], 				], 			]); 		});  		return $this->redirectFromSave('client-surveys.list'); 	}