<?php  namespace App\Services\Emails\Factories;  use App\Enums\EmailType; use App\Models\Applicant; use App\Models\ClientSurvey;  use App\Exceptions\EmailTypeNotFoundException;  class CreateApplicantEmailFactory { 	public static function createEmail(EmailType $type, ClientSurvey $clientSurvey, Applicant $recipient): ApplicantEmailsCreationFactory 	{ 		$lang = $recipient->default_language->value;  		switch ($type) { 			case EmailType::Invitation: return new ApplicantInvitationEmailFactory($clientSurvey, $recipient, $lang);  			case EmailType::Notification: return new ApplicantNotificationEmailFactory($clientSurvey, $recipient, $lang);  			case EmailType::Reminder: return new ApplicantReminderEmailFactory($clientSurvey, $recipient, $lang);  			case EmailType::PulsSurveyInvitation: return new ApplicantInvitationPulsEmailFactory($clientSurvey, $recipient, $lang);  			case EmailType::PulsSurveyReminder: return new ApplicantReminderPulsEmailFactory($clientSurvey, $recipient, $lang); 		}  		throw new EmailTypeNotFoundException; 	} }