@if ($post->is_locked || !$post->is_approved)
@if ($post->is_locked)
{{ __('labels.locked') }} -
{{ __('messages.locked_message') }}
@elseif(!$post->is_approved)
{{ __('labels.pending_approval') }} -
{{ __('messages.pending_approval_message') }}
@endif
@endif
{{ $post->title }}
{{-- Quick Actions --}}
@can('update', $post)
@endcan
@can('delete', $post)
@endcan
{{-- Admin action buttons (with text labels) --}}
@if (Gate::allows('admin-action'))
@endif
{{-- Type and Category Badges --}}
@if ($post->type || $post->category)
@if ($post->type)
{{ __('labels.' . $post->type) }}
@endif
@if ($post->category)
{{ $post->category?->title }}
@endif
@endif
{{-- METADATA CARDS --}}
{{-- Type Card --}}
@if ($post->type)
{{ __('labels.' . $post->type) }}
{{--
{{ __('labels.' . $post->type . '_desc') }}
--}}
@endif
{{-- Category Card --}}
@if ($post->category)
{{ $post->category?->title }}
{{-- @if ($post->category?->description)
{{ Str::limit($post->category?->description, 30, '...') }}
@endif --}}
@endif
{{-- Status Card --}}
@if ($post->is_locked)
{{ __('labels.locked') }}
@elseif(!$post->is_approved)
{{ __('labels.pending_approval') }}
@else
{{ $post->is_published ? __('labels.published') : __('labels.draft') }}
@if ($post->is_published && $post->published_at)
{{ __('labels.since') }} {{ date('d.m.Y H:i', strtotime($post->published_at)) }}
@endif
@endif
@include('components.common.saveable', [
'saveableType' => 'post',
'saveableId' => $post->id,
'isSaved' => auth()->check() ? $post->isSavedByUser(auth()->id()) : false,
'saveCounts' => $post->saves_count ?? $post->saves()->count(),
])
@include('components.common.favorable', [
'favorableType' => 'post',
'favorableId' => $post->id,
'isFavorited' => auth()->check() ? $post->isFavoritedByUser(auth()->id()) : false,
'favoriteCounts' => $post->favorites_count ?? $post->favorites()->count(),
])