@php
$raw = $getState();
$edges = $raw instanceof \Illuminate\Support\Collection ? $raw : collect($raw);
@endphp
@if ($edges->isEmpty())
@foreach ($edges->groupBy('relationship_type') as $type => $group)
{{ str_replace('_', ' ', $type) }}
@foreach ($group as $edge)
@php
$isMissing = ($edge['target_type'] ?? null) === 'missing';
$name = $edge['metadata']['last_known_name'] ?? null;
$targetId = $edge['target_id'] ?? null;
$display = $name ?: ($targetId ? ("ID: ".substr($targetId,0,6)."…") : 'Unknown');
@endphp
-
{{ $display }}
@if ($isMissing)
Missing
@endif
@endforeach
@endforeach