{{ $ticket->subject }}

#{{ $ticket->id }} · {{ $ticket->user?->name }} · {{ ucfirst($ticket->category) }}

@php $statusTone = ['open' => 'warning', 'answered' => 'info', 'customer_reply' => 'partial', 'closed' => 'neutral'][$ticket->status] ?? 'neutral'; @endphp {{ __(ucfirst(str_replace('_', ' ', $ticket->status))) }} @if ($canManage && $ticket->status !== 'closed') @elseif ($canManage) @endif
{{-- Thread (left, 2 cols) --}}
{{-- Flex wrapper that pins the chat's total height to the viewport --}}
{{-- Message area with internal scroll --}}
@foreach ($messages as $msg)
{{ $msg->is_staff ? __('You') : $msg->user?->name }} · {{ $msg->created_at?->diffForHumans() }}
@if ($msg->body)

{{ $msg->body }}

@endif @if (!empty($msg->attachments)) @foreach ($msg->attachments as $att) @if (($att['type'] ?? '') === 'image') {{ __('Attachment') }} @endif @endforeach @endif
@endforeach
{{-- Reply box: always visible at the bottom --}} @if ($ticket->status !== 'closed')
@error('reply')

{{ $message }}

@enderror @error('image')

{{ $message }}

@enderror {{-- Preview of the selected image --}}
{{-- Icon for attaching an image --}}
@else
{{ __('This ticket is closed. Reopen it to reply.') }}
@endif
{{-- Right column: Details + Manage ticket --}}
{{-- Details --}}

{{ __('Details') }}

{{ __('Client') }}{{ $ticket->user?->name }}
{{ __('Email') }}{{ $ticket->user?->email }}
{{ __('Category') }}{{ ucfirst($ticket->category) }}
{{ __('Priority') }} @php $prioTone = ['high' => 'danger', 'medium' => 'warning', 'low' => 'neutral'][$ticket->priority] ?? 'neutral'; @endphp {{ __(ucfirst($ticket->priority)) }}
{{ __('Opened') }}{{ rf_datetime($ticket->created_at) }}
{{-- Manage ticket: right below Details --}} @if ($canManage)

{{ __('Manage ticket') }}

@endif