@php $state = $getState(); $state = is_array($state) ? $state : []; $summary = is_array($state['summary'] ?? null) ? $state['summary'] : []; $highlights = is_array($state['highlights'] ?? null) ? $state['highlights'] : []; $entries = is_array($state['entries'] ?? null) ? $state['entries'] : []; $nextActions = is_array($state['next_actions'] ?? null) ? $state['next_actions'] : []; $links = is_array($state['links'] ?? null) ? $state['links'] : []; $disclosure = is_string($state['disclosure'] ?? null) ? $state['disclosure'] : null; $emptyState = is_string($state['empty_state'] ?? null) ? $state['empty_state'] : null; @endphp
@if ($summary !== [])
@foreach ($summary as $item) @php $label = is_string($item['label'] ?? null) ? $item['label'] : null; $value = is_string($item['value'] ?? null) ? $item['value'] : null; @endphp @continue($label === null || $value === null)
{{ $label }}
{{ $value }}
@endforeach
@endif @if ($highlights !== []) @endif @if ($entries !== [])
Key entries
@foreach ($entries as $entry) @continue(! is_array($entry))
{{ $entry['title'] ?? $entry['displayName'] ?? $entry['type'] ?? 'Entry' }}
@php $detailParts = collect([ $entry['severity'] ?? null, $entry['status'] ?? null, $entry['governance_state'] ?? null, $entry['outcome'] ?? null, ])->filter(fn ($value) => is_string($value) && trim($value) !== '')->map(fn (string $value) => \Illuminate\Support\Str::headline($value))->all(); @endphp @if ($detailParts !== [])
{{ implode(' ยท ', $detailParts) }}
@endif
@endforeach
@elseif ($emptyState)
{{ $emptyState }}
@endif @if ($disclosure)
{{ $disclosure }}
@endif @if ($nextActions !== [])
Follow-up
@endif @if ($links !== [])
@foreach ($links as $link) @continue(! is_array($link) || ! is_string($link['label'] ?? null) || ! is_string($link['url'] ?? null)) {{ $link['label'] }} @endforeach
@endif