@extends('layouts.admin.app') @section('title', __('pages/contact-support.detail_title', ['id' => $record->id, 'subject' => $record->subject])) @section('content')
{{-- Breadcrumb --}}
{{-- Header row --}}
{{-- Left column: main info --}}
{{-- User Information --}}

{{ __('pages/contact-support.labels.user') }}

{{ __('pages/contact-support.labels.user_id') }}
{{ $record->user_id ?? '—' }}
{{ __('form.label.name') ?? 'Name' }}
{{ ucwords($record->full_name) }}
{{ __('pages/contact-support.labels.email') }}
{{ $record->contact_email }}
{{-- Inquiry Information --}}

{{ __('pages/contact-support.labels.inquiry_information') }}

{{ __('pages/contact-support.labels.subject') }}

{{ $record->subject }}

{{ __('pages/contact-support.labels.message') }}

{{ $record->message }}

@if($record->attachment_url)

{{ __('pages/contact-support.labels.attachment') }}

{{ __('pages/contact-support.view_attachment') }}
@endif
{{-- Internal Notes --}}

{{ __('pages/contact-support.labels.internal_notes') }}

{{-- Notes history --}}
@forelse($record->notes as $note) @include('pages.admin.contact-support.partials.note-item', ['note' => $note]) @empty

{{ __('pages/contact-support.labels.no_notes') }}

@endforelse
{{-- Add note form — hidden when inquiry is closed --}} @if($record->status !== 'closed')
@endif
{{-- Right column: status + timestamps --}}
{{-- Status Management --}}

{{ __('pages/contact-support.labels.status') }}

@if($record->status === 'closed') {{-- Locked state: already closed --}}

{{ __('pages/contact-support.status.closed') }}

{{ __('pages/contact-support.messages.status_locked') }}

@else
@foreach($statuses as $status) @if($status === 'closed') {{-- "Closed" always opens the close modal --}} @else @endif @endforeach
@endif
{{-- Close Inquiry Modal (inline Alpine teleport-safe modal) --}} {{-- Timeline --}}

{{ __('pages/contact-support.labels.timeline') }}

@php $timelineEvents = [ [ 'title' => __('pages/contact-support.labels.received_at'), 'description' => __('pages/contact-support.timeline.received_description'), 'date' => format_date($record->created_at, true), 'color' => 'primary', ], ]; if ($record->created_at && $record->updated_at && ! $record->created_at->equalTo($record->updated_at)) { $timelineEvents[] = [ 'title' => __('pages/contact-support.labels.last_updated'), 'date' => format_date($record->updated_at, true), 'color' => 'default', ]; } @endphp
@endsection @push('before-app-js') @vite(['resources/js/admin/contact-support.js']) @endpush