@if($serviceAvailable)
{{-- Expanded Chat Panel --}}
{{-- Header --}}
{{ __('user.ai_assistant') }}
{{-- Sound Toggle --}} {{-- Clear Button --}} {{-- Close Button --}}
{{-- Clear Confirmation Overlay --}}

{{ __('user.ai_clear_conversation_confirm') }}

{{ __('user.ai_clear_cannot_undo') }}

{{-- Messages Area --}}
@foreach($displayMessages as $index => $msg) @if($msg['role'] === 'user') {{-- User Message --}}
{{ $msg['content'] }}
@elseif($msg['role'] === 'assistant') {{-- Assistant Message --}}
@if(isset($msg['isStreaming']))
@elseif(isset($msg['typewriter']))
@else
{!! \Illuminate\Support\Str::markdown($msg['content'], ['renderer' => ['soft_break' => "
\n"]]) !!}
@endif
@endif @endforeach {{-- Loading Indicator --}} @if($isLoading && !$streamingEnabled)
@endif
{{-- Input Area --}}
{{-- Floating Action Button (when collapsed) --}}
{{-- Widget Scripts --}} @script @endscript @endif