@foreach($availablePosts as $post)
@php
$translation = $post->translations->first();
$isSelected = in_array($post->id, $selectedPostIds);
@endphp
@if($translation)
{{ $translation->title }}
@if($translation->excerpt)
{{ Str::limit($translation->excerpt, 100) }}
@endif
ID: {{ $post->id }}
@if($post->category)
{{ $post->category->translations->first()->name ?? 'Uncategorized' }}
@endif
{{ $post->updated_at->format('M j, Y') }}
@php
$publishedTranslations = $this->getPublishedTranslationsWithFlags($post);
@endphp
@if($publishedTranslations->count() > 0)
@foreach($publishedTranslations as $pubTranslation)
{{ $pubTranslation['flag'] }}
@endforeach
@else
Not currently published
@endif
@if($post->category)
@php
$categoryId = $post->category->id;
$categoryName = $post->category->translations->first()->name ?? 'Uncategorized';
// Determine color based on category type
$colorClass = 'bg-gray-100 text-gray-800'; // default
if(in_array($categoryId, [4, 8])) $colorClass = 'bg-theme-surface text-theme-primary'; // news
elseif($categoryId === 5) $colorClass = 'bg-green-100 text-green-800'; // article
elseif(in_array($categoryId, [6, 7])) $colorClass = 'bg-theme-danger-light text-theme-danger-dark'; // event
@endphp
{{ $categoryName }}
@endif
@endif
@endforeach
@if($postSearch)
{{ __('No posts found matching your search.') }}
@else
{{ __('No published posts available.') }}
@endif
@if($postSearch)
{{ __('Try a different search term or clear the search to see all posts.') }}
@endif