@extends('central.super.layout') @section('title', __('central.EmailNotificationTemplates')) @section('content') @php $totalLanguages = $languages->count() > 1 ? $languages->where('is_default', false)->count() : 0; @endphp @if($templates->isEmpty())

{{ __('central.NoTemplatesFound') }}

{{ __('central.RunSeederToCreateTemplates') }}
php artisan db:seed --class="Database\Seeders\Central\EmailTemplatesSeeder"

@else
@foreach($templates as $tpl) @php $color = $triggerColors[$tpl->trigger_key] ?? '#6366f1'; $icon = $triggerIcons[$tpl->trigger_key] ?? 'bi-envelope'; $label = $triggerLabels[$tpl->trigger_key] ?? $tpl->trigger_key; @endphp

{{ $tpl->name }}

@if($tpl->is_active) {{ __('central.Active') }} @else {{ __('central.Inactive') }} @endif

{{ __('central.Trigger') }}: {{ $tpl->trigger_key }}

@if($totalLanguages > 0) @php $translatedCount = $tpl->translations->count(); @endphp
@if($translatedCount === $totalLanguages) {{ __('central.AllTranslations', ['count' => $totalLanguages]) }} @elseif($translatedCount > 0) {{ __('central.PartialTranslations', ['done' => $translatedCount, 'total' => $totalLanguages]) }} @else {{ __('central.NoTranslations') }} @endif
@endif
{{ __('central.Subject') }}: {{ $tpl->subject }}
@endforeach

{{ __('central.AvailableVariables') }}

{{ __('central.AvailableVariablesDesc') }}

@foreach(\App\Models\Central\EmailTemplate::AVAILABLE_VARIABLES as $var => $desc)
{{ $var }} — {{ $desc }}
@endforeach
@endif @endsection