@php
// prefer the model's comment, otherwise use the relevant history comment (if any)
$docComment = $debutActivite->commentaire_motif ?? null;
$currentComment = !empty($docComment) ? $docComment : ($relevantHistory->commentaire ?? null);
// metadata if comment came from history
$commentFromHistory = empty($docComment) && isset($relevantHistory) && !empty($relevantHistory->commentaire);
$historyAuthor = $relevantHistory->changer->name ?? $relevantHistory->changed_by ?? null;
$historyAt = isset($relevantHistory->created_at) ? $relevantHistory->created_at->format('Y-m-d H:i') : null;
@endphp
@if(!empty($currentComment))
{{ __('site.start_activity.current_comment') }}
{{ $currentComment }}