@extends('layouts.main_dashboard.app') @php $isArabic = app()->getLocale() === 'ar'; $pageTitle = $isArabic ? 'سلة المهملات' : 'Trash Bin'; $totalDeletedItems = (int) $counts->sum(); $selectedItemsCount = $selectedType === 'all' ? $items->count() : (int) ($counts[$selectedType] ?? 0); $selectedLabel = $selectedType === 'all' ? ($isArabic ? 'كل العناصر المحذوفة' : 'All deleted items') : \App\Support\AdminTrashRegistry::label($selectedType); $latestDeletedAt = $items->pluck('deleted_at')->filter()->sortDesc()->first(); @endphp @section('title', $pageTitle) @section('page_heading', $pageTitle) @section('skip_page_hero', true) @section('content')
{{ $isArabic ? 'منطقة الاستعادة الآمنة' : 'Safe recovery zone' }}

{{ $selectedLabel }}

{{ $isArabic ? 'كل عنصر هنا ما زال قابلاً للاستعادة. استخدم الحذف النهائي فقط عند التأكد أنك لا تريد إرجاعه مرة أخرى.' : 'Everything listed here can still be restored. Use permanent delete only when you are sure the item should never return.' }}

{{ $isArabic ? 'إجمالي المحذوفات' : 'Total deleted' }} {{ $totalDeletedItems }} {{ $isArabic ? 'المجموعة الحالية' : 'Current scope' }} {{ $selectedItemsCount }} @if ($latestDeletedAt) {{ $latestDeletedAt->diffForHumans() }} @endif

{{ $isArabic ? 'تنبيه مهم' : 'Important notice' }}

{{ $isArabic ? 'الاستعادة تعيد العنصر كما كان، أما الحذف النهائي فيزيله نهائياً مع أي ملفات مرتبطة به إذا كان النظام يدعم ذلك.' : 'Restore returns the item as it was. Permanent delete removes it completely, along with linked files when supported by the system.' }}

{{ $isArabic ? 'تصفية حسب النوع' : 'Filter by type' }}

{{ $isArabic ? 'بدّل بين المجموعات لتصل بسرعة إلى النوع الذي تريد مراجعته.' : 'Switch between groups to jump directly to the kind of item you want to review.' }}

{{ $isArabic ? 'المجموعة النشطة مميزة بخلفية أقوى وحد علوي واضح.' : 'The active group is highlighted with a stronger background and clearer emphasis.' }}
{{ $isArabic ? 'كل العناصر' : 'All items' }} {{ $totalDeletedItems }} @foreach ($definitions as $type => $definition) @php $active = $selectedType === $type; $label = $isArabic ? $definition['label_ar'] : $definition['label_en']; @endphp {{ $label }} {{ $counts[$type] }} @endforeach

{{ $selectedLabel }}

{{ $selectedType === 'all' ? ($isArabic ? 'أحدث العناصر المحذوفة من مختلف أقسام النظام.' : 'Latest deleted items from across the system.') : ($isArabic ? 'راجع العناصر المحذوفة من هذا النوع وحدد ما إذا كنت تريد استعادتها أو حذفها نهائياً.' : 'Review deleted items in this category and decide whether to restore or remove them permanently.') }}

{{ $isArabic ? 'العناصر المعروضة' : 'Displayed items' }} {{ $items->count() }}
@forelse ($items as $item)
{{ $item['label'] }} {{ $isArabic ? 'محذوف' : 'Deleted' }}

{{ $item['title'] }}

@if ($item['deleted_at']) {{ $item['deleted_at']->format('Y-m-d h:i A') }} {{ $item['deleted_at']->diffForHumans() }} @endif
@csrf
@csrf @method('DELETE')
@empty

{{ $isArabic ? 'لا توجد عناصر محذوفة حالياً' : 'No deleted items right now' }}

{{ $isArabic ? 'عندما يتم حذف عناصر قابلة للاستعادة ستظهر هنا، ويمكنك من هذه الصفحة استعادتها أو حذفها نهائياً.' : 'When recoverable items are deleted they will appear here, and you will be able to restore or permanently remove them from this page.' }}

@endforelse
@if ($selectedType !== 'all')
{{ $paginator->links() }}
@endif
@endsection