@if ($customerEmailTemplates->count() > 0)
@foreach ($customerEmailTemplates as $key => $customerEmailTemplate)
@if (Auth::user()->can('update', $customerEmailTemplate)) @endif
{{ $customerEmailTemplate->name }}

@if (Auth::user()->can('update', $customerEmailTemplate)) @if ($customerEmailTemplate->template->categories()->count()) {{ $customerEmailTemplate->template->categories->map(function ($cat) { return $cat->name; })->join(', ') }} @else {{ trans('messages.template.category.no_category_set') }} @endif @else {{ $customerEmailTemplate->template->categories()->count() ? $customerEmailTemplate->template->categories->map(function ($cat) { return $cat->name; })->join(', ') : 'N/A' }} @endif

@if (Auth::user()->can('preview', $customerEmailTemplate) || Auth::user()->can('copy', $customerEmailTemplate) || Auth::user()->can('delete', $customerEmailTemplate) || Auth::user()->can('update', $customerEmailTemplate))
@endif
@endforeach
@include('elements/_per_page_select', ["items" => $customerEmailTemplates, 'custom_per_pages' => [8, 12, 24]]) @elseif (!empty(request()->keyword))
auto_awesome_mosaic {{ trans('messages.no_search_result') }}
@else
auto_awesome_mosaic {{ trans('messages.template_empty_line_1') }}
@endif