@php $run = $this->getRun(); @endphp @if ($run) {{-- Tant que l'analyse tourne, on interroge l'état toutes les 4 s (Prompt 12 §A2) ; une fois terminée/échouée, plus de polling (rendu statique). Le polling porte sur un wrapper simple, pas sur le composant section (Blade n'accepte pas @if dans une balise de composant). --}}
isActive()) wire:poll.4s @endif> @if ($run->isActive())

{{ __('ai.background.in_progress_title') }}

{{ __('ai.background.in_progress_body') }}

@if ($run->looksStalled())

{{ __('ai.background.worker_inactive') }}

@endif
@elseif ($run->status === \App\Enums\AiAnalysisStatus::Completed) {{-- v3.29.0 §D6 : la bannière NOMME l'AO analysé et son lien mène droit à sa fiche — « Ouvrez la fiche pour vérifier » sans référence laissait chercher laquelle. --}} @php $url = $this->runUrl($run); $sujet = $this->runLabel($run); @endphp

{{ __('ai.background.done_title') }}@if ($sujet) — {{ $sujet }}@endif

@if ($sujet && $url) {{ __('ai.background.notify_done_body_sujet', ['sujet' => $sujet]) }} {{ __('ai.background.open') }} {{ $sujet }} → @else {{ __('ai.background.done_body') }} @endif

@if ($url) {{ __('ai.background.open') }} @endif {{ __('ai.background.close') }}
@else

{{ __('ai.background.failed_title') }}

{{ $run->error ?: __('ai.background.failed') }}

{{ __('ai.background.relaunch') }} {{ __('ai.background.close') }}
@endif
@endif