@php use Illuminate\Support\Str; // Extract state from Filament ViewEntry $state = $getState(); $status = $state['status'] ?? 'success'; $warnings = $state['warnings'] ?? []; $settings = $state['settings'] ?? []; $settingsTable = $state['settings_table'] ?? null; @endphp
{{-- Warnings --}} @if(!empty($warnings))
@foreach($warnings as $warning)
{{ $warning }}
@endforeach
@endif {{-- Settings Table (for Settings Catalog legacy format) --}} @if($settingsTable && !empty($settingsTable['rows'])) {{ count($settingsTable['rows']) }} {{ Str::plural('setting', count($settingsTable['rows'])) }}
@foreach($settingsTable['rows'] as $row)
{{ $row['definition'] ?? $row['label'] ?? $row['path'] ?? 'Setting' }}
@if(is_bool($row['value'])) {{ $row['value'] ? 'Enabled' : 'Disabled' }} @elseif(is_numeric($row['value'])) {{ $row['value'] }} @else {{ $row['value'] ?? 'N/A' }} @endif
@endforeach
@endif {{-- Settings Blocks (for OMA Settings, Key/Value pairs, etc.) --}} @foreach($settings as $block) @if($block['type'] === 'table') {{ count($block['rows'] ?? []) }} {{ Str::plural('item', count($block['rows'] ?? [])) }}
@foreach($block['rows'] ?? [] as $row)
{{ $row['label'] ?? $row['path'] ?? 'Setting' }} @if(!empty($row['description']))

{{ Str::limit($row['description'], 80) }}

@endif
@if(is_bool($row['value'])) {{ $row['value'] ? 'Enabled' : 'Disabled' }} @elseif(is_numeric($row['value'])) {{ $row['value'] }} @else {{ Str::limit($row['value'] ?? 'N/A', 200) }} @endif
@endforeach
@elseif($block['type'] === 'keyValue') {{ count($block['entries'] ?? []) }} {{ Str::plural('entry', count($block['entries'] ?? [])) }}
@foreach($block['entries'] ?? [] as $entry)
{{ $entry['key'] }}
{{ Str::limit($entry['value'] ?? 'N/A', 200) }}
@endforeach
@endif @endforeach {{-- Empty state --}} @if(empty($settings) && (!$settingsTable || empty($settingsTable['rows'])))

No settings data available

This policy may not contain settings, or they are in an unsupported format

@endif