{{ t('ticket_details') }}

{{ t('conversation') }} ({{ $ticket->replies->count() }} replies)

@forelse($ticket->replies->sortBy('created_at') as $reply)
{{ strtoupper(substr($reply->user->name ?? 'U', 0, 1)) }}
{{ $reply->user->name ?? 'Unknown User' }}
{{ $reply->user_type === 'tenant' ? 'tenant' : 'Support Agent' }} • {{ format_date_time($reply->created_at) }}
@if ($reply->user_type === 'system') {{ t('system_message') }} @endif
{!! nl2br(e($reply->content)) !!}
@if ($reply->attachments && count($reply->attachments) > 0)
{{ t('attachments') }}
@foreach ($reply->attachments as $attachment)
@if (is_array($attachment)) {{ $attachment['filename'] }} ({{ number_format($attachment['size'] / 1024, 1) }} KB) @else {{ basename($attachment) }} {{ t('file') }} @endif
@endforeach
@endif
@empty

{{ t('no_replies_yet_first_add_reply') }}

@endforelse
@if ($showReplyForm)

{{ t('add_reply') }}

@error('content')

{{ $message }}

@enderror

{{ t('upload_files') }}

{{ t('click_to_browse') }}

status === 'closed' ? 'disabled' : '' }}>

{{ t('maximum_files_10mb_each') }}

{{ t('file_validation_errors') }}

@error('attachments.*')

{{ $message }}

@enderror

{{ t('selected_files') }} ()

@if ($ticket->status === 'closed')

{{ t('ticket_is_closed') }}

@endif
{{ t('reply_visible_support_agents') }}
@endif