@props([ 'alertas' => collect(), ]) @php $alertas = $alertas ?? collect(); $temRotacao = $alertas->count() > 1; @endphp
$temRotacao, ]) id="ma-feature-alertas" @if ($temRotacao) data-ma-alertas-rotate @endif> $alertas->isNotEmpty(), ]) aria-hidden="true">

{{ __('Alertas em tempo real') }}

@if ($alertas->isNotEmpty())
@foreach ($alertas as $index => $alerta) @php $mensagemCard = $alerta->mensagem_resumida_exibicao; $textoRotacao = trim($alerta->titulo_resumido . ' ' . $mensagemCard); $duracaoMs = min(8000, max(6000, mb_strlen($textoRotacao) * 70)); @endphp
$index === 0, ]) data-ma-alerta-slide data-duration="{{ $duracaoMs }}" @if ($index !== 0) aria-hidden="true" @endif> categoria->tagClass()])> {{ $alerta->categoria->label() }}

{{ $alerta->titulo_resumido }}

@if ($mensagemCard)

{{ $mensagemCard }}

@endif
@endforeach
@else

{{ __('Fique por dentro de alterações de rotas, horários e obras.') }}

@endif
@if ($temRotacao) @endif {{ __('Ver alertas') }}