@if($showEmptyState && count($messages) === 0)

{{ __('student.chat.new_chat_title') }}

{{ __('student.chat.new_chat_message') }}

@else @foreach($messages as $msg)
@if($msg['role'] === 'user') {{ strtoupper(substr(auth()->user()->first_name, 0, 1)) }} @else @endif
{{ $msg['role'] === 'user' ? auth()->user()->first_name : 'MentoraMind' }} {{ \Carbon\Carbon::parse($msg['created_at'])->format('H:i') }}
{!! $msg['content'] !!}
@endforeach @if($sending)
MentoraMind
@endif @endif
@if(!$canSendMessage)
{{ $limitMessage }}
@else
@error('message') {{ $errors->first('message') }} @enderror
@endif
@script @endscript