{{-- Filter & Actions Panel --}}

{{ __('Tickets') }}

{{ __('Manage support tickets, priorities, and resolutions.') }}

{{ __('Download Template') }}
{{ __('Reset') }}
{{-- Tickets Table Panel --}}

{{ __('Ticket Directory') }}

{{ __('Showing') }} {{ $tickets->firstItem() ?? 0 }}-{{ $tickets->lastItem() ?? 0 }} {{ __('of') }} {{ $tickets->total() }} {{ __('tickets.') }}

{{ __('Export') }}
{{-- List View --}}
@forelse($tickets as $ticket) {{-- Delete confirmation modal --}}
@csrf @method('DELETE')

{{ __('Delete ticket') }} "{{ Str::limit($ticket->subject, 40) }}"?

{{ __('This will') }} {{ __('permanently delete') }} {{ __('this ticket and all its replies. This action cannot be undone.') }}

@empty @endforelse
{{ __('Subject') }} {{ __('User') }} {{ __('Priority') }} {{ __('Status') }} {{ __('Date') }} {{ __('Actions') }}
{{ Str::limit($ticket->subject, 50) }} @if($ticket->category)

{{ ucfirst($ticket->category) }}

@endif
{{ $ticket->user?->initials ?? '??' }}
{{ $ticket->user?->name ?? __('Unknown') }}

{{ $ticket->user?->email ?? __('N/A') }}

{{ ucfirst($ticket->priority) }} {{ str_replace('_', ' ', ucfirst($ticket->status)) }} {{ $ticket->created_at->format('M j, Y') }}
{{ __('View') }}
{{ __('No tickets found.') }}
{{-- Grid View --}}
@forelse($tickets as $ticket)
{{ $ticket->user?->initials ?? '??' }}
{{ Str::limit($ticket->subject, 40) }}

{{ $ticket->user?->name ?? __('Unknown') }}

{{ ucfirst($ticket->priority) }} {{ str_replace('_', ' ', ucfirst($ticket->status)) }}
@if($ticket->category) {{ ucfirst($ticket->category) }} @else @endif {{ $ticket->created_at->format('M j, Y') }}
@empty
{{ __('No tickets found.') }}
@endforelse
@if($tickets->hasPages())
{{ $tickets->withQueryString()->links() }}
@endif
{{-- Import Modal --}}
@csrf

{{ __('Import Tickets') }}

{{ __('Upload a CSV file that matches the provided template.') }}

{{-- Add Ticket Modal — submits to admin.tickets.store which creates a new Ticket row. Admin can log it on behalf of a user (enter their email in the User Email field — looked up by the backend) or leave the user blank for an unattributed internal ticket. --}}
@csrf

{{ __('Add Ticket') }}

{{ __('Create a support ticket on behalf of a user.') }}

{{ __('Leave blank for an unattributed ticket.') }}

{{-- Bulk Delete Modal --}}
@csrf

{{ __('Delete selected tickets?') }}

{{ __('You are about to') }} {{ __('permanently delete') }} {{ __('the selected ticket(s) and all their replies. This action cannot be undone.') }}