<?php  namespace App\Models;  use Closure; use Carbon\Carbon; use App\Enums\EmailType; use App\Enums\SurveyType; use App\Enums\DomainLanguages; use App\Traits\HasTranslations; use Illuminate\Support\Collection; use Illuminate\Database\Eloquent\Builder;  class EmailTemplate extends Model { 	use HasTranslations;  	public array $translatable = ['content', 'subject'];  	protected $casts = [ 		'content' => 'array', 		'subject' => 'array', 	];  	public static function handleAdminTypes(Closure $closure, ?int $survey_type_value = null): void 	{ 		foreach (DomainLanguages::cases() as $language) { 			if ($survey_type_value == SurveyType::IZZ->value) { 				foreach (EmailType::getIzzAdminTemplateTypes() as $type) { 					$closure($language, $type); 				} 			}  			if ($survey_type_value == SurveyType::PULS->value) { 				foreach (EmailType::getPulsAdminTemplateTypes() as $type) { 					$closure($language, $type); 				} 			} 		} 	}  	public static function getTranslationFromCollection(Collection $emails, int $type, string $lang, string $field): ?string 	{ 		return $emails->firstWhere('type', $type)?->getTranslation($field, $lang, false) != '' 			? $emails->firstWhere('type', $type)?->getTranslation($field, $lang, false) 			: self::where('type', $type)->whereNull('client_survey_id')->first()?->getTranslation($field, $lang, false); 	}  	public function scopeType(Builder $query, int $type): Builder{}  	public function scopeBase(Builder $query): Builder{}  	public function replacePlaceholdersInEmail(ClientSurvey $client_survey, EmailType $type, string $lang, string $template): array|string{}  	public function getSurveyStartDate(ClientSurvey $client_survey): string{}  	public function replacePlaceholdersInStartedOnlineMail(ClientSurvey $client_survey, EmailType $type, string $template, string $lang): array|string{}  	public function replacePlaceholdersInStartedCombinedMail(ClientSurvey $client_survey, EmailType $type, string $template, string $lang): array|string{}  	public function replacePlaceholdersInAdminPublishMail(ClientSurvey $client_survey, EmailType $type, string $template, string $lang): array|string{} }