@php use App\Support\Ui\EnterpriseDetail\FactPresentation; $header = $header ?? []; $header = is_array($header) ? $header : []; $statusBadges = array_values(array_filter($header['statusBadges'] ?? [], 'is_array')); $keyFacts = array_values(array_filter($header['keyFacts'] ?? [], 'is_array')); $primaryActions = array_values(array_filter($header['primaryActions'] ?? [], 'is_array')); @endphp
@if ($statusBadges !== [])
@foreach ($statusBadges as $badge) {{ $badge['label'] ?? 'State' }} @endforeach
@endif
{{ $header['title'] ?? 'Detail' }}
@if (filled($header['subtitle'] ?? null))
{{ $header['subtitle'] }}
@endif @if (filled($header['descriptionHint'] ?? null))
{{ $header['descriptionHint'] }}
@endif
@if ($primaryActions !== [])
@foreach ($primaryActions as $action) @if (filled($action['url'] ?? null)) @if (filled($action['icon'] ?? null)) @endif {{ $action['label'] }} @endif @endforeach
@endif
@if ($keyFacts !== [])
@foreach ($keyFacts as $fact) @php $displayValue = FactPresentation::value($fact); $badge = is_array($fact['badge'] ?? null) ? $fact['badge'] : null; @endphp
{{ $fact['label'] ?? 'Fact' }}
@if ($displayValue !== null) {{ $displayValue }} @endif @if ($badge !== null) {{ $badge['label'] ?? 'State' }} @endif
@if (filled($fact['hint'] ?? null))
{{ $fact['hint'] }}
@endif
@endforeach
@endif