{{-- Breadcrumb + title --}}

{{ __($ticket->subject) }}

#{{ $ticket->id }} @if ($ticket->order_id) · {{ __('Order') }} #{{ $ticket->order_id }} @endif · {{ rf_date($ticket->created_at) }}

@php $tone = ['open' => 'warning', 'answered' => 'success', 'customer_reply' => 'info', 'closed' => 'neutral'][$ticket->status] ?? 'neutral'; @endphp {{ __(ucfirst(str_replace('_', ' ', $ticket->status))) }} @if ($ticket->status !== 'closed') @else @endif
{{-- Thread (left 2 cols) --}}
{{-- Messages --}}
@forelse ($messages as $msg) @php $isMine = ! $msg->is_staff; @endphp
{{ $isMine ? __('You') : ($msg->user?->name ?? __('Support')) }} · {{ $msg->created_at?->diffForHumans() }}
@if ($msg->body)

{{ $msg->body }}

@endif
{{-- Attachments --}} @if (!empty($msg->attachments))
@foreach ($msg->attachments as $att) @if (str_starts_with($att['mime'] ?? '', 'image/')) {{ $att['name'] }} @else {{ $att['name'] }} @if (!empty($att['size'])) {{ number_format($att['size'] / 1024, 1) }} KB @endif @endif @endforeach
@endif
@empty

{{ __('No messages yet.') }}

@endforelse
{{-- Reply composer --}} @if ($ticket->status !== 'closed')
@error('reply')

{{ $message }}

@enderror {{-- Upload progress --}}
{{-- Pending files --}} @if ($uploadedFiles)
@foreach ($uploadedFiles as $i => $file)
@if (str_starts_with($file->getMimeType(), 'image/')) @else @endif {{ $file->getClientOriginalName() }}
@endforeach
@endif
@else
{{ __('This ticket is closed. Reopen it to send more messages.') }}
@endif
{{-- Details sidebar --}}

{{ __('Ticket details') }}

{{ __('Subject') }} {{ __($ticket->subject) }}
@if ($ticket->order_id)
{{ __('Order') }} #{{ $ticket->order_id }}
@endif
{{ __('Status') }} @php $tone = ['open' => 'warning', 'answered' => 'success', 'customer_reply' => 'info', 'closed' => 'neutral'][$ticket->status] ?? 'neutral'; @endphp {{ __(ucfirst(str_replace('_', ' ', $ticket->status))) }}
{{ __('Priority') }} @php $prioTone = ['high' => 'danger', 'medium' => 'warning', 'low' => 'neutral'][$ticket->priority] ?? 'neutral'; @endphp {{ __(ucfirst($ticket->priority)) }}
{{ __('Opened') }} {{ rf_datetime($ticket->created_at) }}
@if ($ticket->last_reply_at)
{{ __('Last reply') }} {{ $ticket->last_reply_at->diffForHumans() }}
@endif

{{ __('The platform support team will reply here. You will be notified when they respond.') }}