@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-900']) @php use Illuminate\Support\Facades\Storage; @endphp @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'Chat - ' . ($chat->agente->nome ?? 'Agente')])
@if($chat->mensagens->count() > 0) @foreach($chat->mensagens as $mensagem)
@if($mensagem->tipo === 'assistant' && $chat->agente && $chat->agente->foto) @elseif($mensagem->tipo === 'assistant') @elseif($mensagem->tipo === 'user')
U
@endif
@if($mensagem->tipo === 'assistant')
{{ $chat->agente->nome ?? 'Agente' }}
@elseif($mensagem->tipo === 'user')
Você
@endif @if($mensagem->tipo === 'assistant' && $mensagem->tempo_pensamento_segundos)
Pensou por {{ $mensagem->tempo_pensamento_segundos >= 60 ? (floor($mensagem->tempo_pensamento_segundos/60) . 'm ' . ($mensagem->tempo_pensamento_segundos % 60) . 's') : ($mensagem->tempo_pensamento_segundos . 's') }}
@endif
{{ $mensagem->created_at->format('d/m/Y H:i') }}
@if($mensagem->tipo === 'assistant')
@else
@endif
@endforeach @else
Inicie uma conversa

Digite sua mensagem abaixo para começar a conversar com {{ $chat->agente->nome ?? 'o agente' }}.

@endif
Agente está digitando...
@if(!empty($agenteBloqueado)) @endif
@csrf
{{-- Painel do agente (estilo WhatsApp) --}}
Sobre o agente
@if($chat->agente) @if($chat->agente->foto) {{ $chat->agente->nome }} @else
{{ strtoupper(substr($chat->agente->nome ?? 'A', 0, 1)) }}
@endif
{{ $chat->agente->nome ?? 'Agente' }}
@if($chat->agente && $chat->agente->especialidade)
{{ $chat->agente->especialidade }}
@endif @if($chat->agente->quem_e)
Quem é
{{ $chat->agente->quem_e }}
@endif @if($chat->agente->o_que_faz)
O que faz
{{ $chat->agente->o_que_faz }}
@endif @if($chat->agente->objetivo)
Objetivo
{{ $chat->agente->objetivo }}
@endif @if($chat->agente->tom_resposta)
Tom de resposta
{{ $chat->agente->tom_resposta }}
@endif @if($chat->agente->telefone)
Telefone
{{ $chat->agente->telefone }}
@endif @if($chat->agente->horarios_funcionamento)
Horários
{{ $chat->agente->horarios_funcionamento }}
@endif @if($chat->agente->localizacao_contato)
Localização / Contato
{{ $chat->agente->localizacao_contato }}
@endif @if(!$chat->agente->quem_e && !$chat->agente->o_que_faz && !$chat->agente->objetivo && !$chat->agente->tom_resposta && !$chat->agente->telefone && !$chat->agente->horarios_funcionamento && !$chat->agente->localizacao_contato)
Nenhuma informação adicional configurada para este agente.
@endif @else
Agente não encontrado.
@endif
@endsection