@extends('layouts.customer') @section('content')
Back to Support {{-- Ticket Header --}}

{{ $ticket->subject }}

{{ str_replace('_', ' ', ucfirst($ticket->status)) }}
{{ ucfirst($ticket->category) }} {{ ucfirst($ticket->priority) }} Created: {{ $ticket->created_at->format('M d, Y h:i A') }}
{{-- Message Thread --}}
@forelse($ticket->replies ?? [] as $reply)

{{ $reply->is_admin ? ($reply->sender_name ?? 'Support') : 'You' }}

{{ $reply->message }}

{{ $reply->created_at->format('M d, Y h:i A') }}

@empty

No messages yet. Start the conversation below.

@endforelse
{{-- Reply Form --}} @if($ticket->status !== 'closed' && $ticket->status !== 'resolved')

Reply

@csrf @method('POST')
@error('message')

{{ $message }}

@enderror
@csrf @method('PATCH')
@else

This ticket has been {{ $ticket->status }}.

@if($ticket->status === 'closed')
@csrf @method('PATCH')
@endif
@endif
@endsection