@if (($chatWidgetEnabled ?? false) === true) @php /** @var \Musonza\Chat\Models\Conversation|null $chatSelectedConversation */ $chatCanCreateConversation = ($chatCanCreateConversation ?? false) === true; $chatSidebarVisible = ($chatSidebarVisible ?? true) === true; $threadOnlyMode = !$chatSidebarVisible; $hasSelectedConversation = $chatSelectedConversation instanceof \Musonza\Chat\Models\Conversation; $selectedConversationTitle = $chatSelectedConversation?->data['title'] ?? ($hasSelectedConversation ? 'ჩატი #' . $chatSelectedConversation->id : 'აირჩიეთ ჩატი'); $chatUnreadCounts = $chatUnreadCounts ?? []; $chatUnreadTotal = (int) ($chatUnreadTotal ?? 0); $selectedParticipants = $hasSelectedConversation ? $chatSelectedConversation->participants ->map(fn($participation) => $participation->messageable?->name) ->filter() ->unique() ->values() : collect(); @endphp
ჩატი
@if ($chatSidebarVisible) @endif

{{ $threadOnlyMode ? 'ადმინისტრაციასთან ჩატი დროებით მიუწვდომელია.' : 'აირჩიეთ ჩატი მარცხენა სიიდან ან შექმენით ახალი ჯგუფი.' }}

@if ($chatSidebarVisible) @endif
{{ $selectedConversationTitle }}
@if ($chatCanCreateConversation) @endif
@forelse ($chatMessagePayloads as $message) @php($reply = $message['data']['reply'] ?? null) @php($replyBody = trim((string) ($reply['body'] ?? '')) ?: (string) ($reply['file_name'] ?? ''))
@if ($message['is_me'] && $message['type'] === 'text') @endif @if ($message['is_me']) @endif
{{ $message['sender_name'] }} • {{ $message['created_at'] }}@if ($message['edited_at']) (რედაქტირებულია) @endif @if (is_array($reply) && !empty($reply['id'])) @endif
{{ $message['body'] }}
@if (($message['data']['file_url'] ?? null) && in_array($message['type'], ['attachment', 'image'], true)) @endif
@empty
პირველი შეტყობინება თქვენ შეგიძლიათ გააგზავნოთ.
@endforelse
@csrf
@endif