@include('theme-views.partials._profile-aside')
@if(isset($allChattingUsers) && count($allChattingUsers) > 0) @foreach($allChattingUsers as $key => $chatting) @php($userId = !is_null($chatting->admin_id) ? 0 : ($chatting?->seller_id ?? $chatting?->delivery_man_id) ) @php($seenMessage = !is_null($chatting->admin_id) ? $chatting->sent_by_admin : ($chatting?->seller_id ? $chatting->sent_by_seller : $chatting->sent_by_delivery_man) ) @php($userName = !is_null($chatting->admin_id) ? getWebConfig('company_name') : ($chatting?->seller_id ? $chatting?->seller?->shop->name : $chatting?->deliveryMan?->f_name ))
@if($chatting->delivery_man_id) @elseif($chatting?->seller_id) @else @endif
{{$userName}}
{{$chatting->created_at->diffForHumans()}}

@if($chatting->message) {{ $chatting->message }} @elseif(json_decode($chatting['attachment'], true) !=null) {{ translate('sent_attachments') }} @endif @if($chatting['unseen_message_count'] > 0) {{ $chatting['unseen_message_count'] }} @endif

@endforeach @endif
@if(isset($chattingMessages) && count($chattingMessages) > 0)
{{ $userType == 'admin' ? getWebConfig('company_name') : ($userType == 'vendor' ? $lastChatUser->name : ($lastChatUser?->f_name.' '.$lastChatUser?->l_name)) }}
@include('theme-views.users-profile.inbox.messages')
@csrf
{{ translate('sorry') }} ! {{ translate('currently_we_are_not_available.') }} {{ translate('but_you_can_ask_or_still_message_us.') }} {{ translate('We_will_get_back_to_you_soon.') }} {{ translate('Thank_you_for_your_patience.') }}.
@else
{{ translate('No_message_found') }}!
@endif