@php $normalized = $getState() ?? []; $warnings = $normalized['warnings'] ?? []; $settings = $normalized['settings'] ?? []; $settingsTable = $normalized['settings_table'] ?? null; $settingsTableRows = is_array($settingsTable) ? ($settingsTable['rows'] ?? []) : []; $context = $normalized['context'] ?? 'policy'; $recordId = $normalized['record_id'] ?? null; @endphp
@if (! empty($warnings))
Warnings
@endif @if (empty($settings) && empty($settingsTableRows))

No settings available.

@endif @if (! empty($settingsTableRows))
{{ is_array($settingsTable) ? ($settingsTable['title'] ?? 'Settings') : 'Settings' }}
@endif @foreach ($settings as $block) @php $title = $block['title'] ?? 'Settings'; $isGeneral = is_string($title) && strtolower($title) === 'general'; @endphp @if ($isGeneral) {{ count($block['entries'] ?? []) }} fields @if (($block['type'] ?? 'keyValue') === 'table') @php $columns = $block['columns'] ?? null; $hasColumns = is_array($columns) && ! empty($columns); $columnMeta = [ 'definitionId' => ['width' => 'w-[35%]', 'style' => 'width: 35%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], 'instanceType' => ['width' => 'w-[20%]', 'style' => 'width: 20%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], 'value' => ['width' => 'w-[25%]', 'style' => 'width: 25%;', 'cell' => 'break-words whitespace-pre-wrap', 'cellStyle' => 'overflow-wrap: anywhere; white-space: pre-wrap;'], 'path' => ['width' => 'w-[20%]', 'style' => 'width: 20%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], ]; @endphp
@if ($hasColumns) @foreach ($columns as $column) @php $key = $column['key'] ?? null; $meta = is_string($key) ? ($columnMeta[$key] ?? []) : []; @endphp @endforeach @else @endif @foreach ($block['rows'] ?? [] as $row) @if ($hasColumns) @foreach ($columns as $column) @php $key = $column['key'] ?? null; $cell = is_string($key) ? ($row[$key] ?? null) : null; $meta = is_string($key) ? ($columnMeta[$key] ?? []) : []; @endphp @endforeach @else @endif @endforeach
{{ $column['label'] ?? $column['key'] ?? '-' }}Path Value
@if (is_array($cell))
{{ json_encode($cell, JSON_PRETTY_PRINT) }}
@elseif (is_bool($cell)) {{ $cell ? 'true' : 'false' }} @else {{ $cell ?? '-' }} @endif
{{ $row['path'] ?? '-' }}
@if (! empty($row['label']))
{{ $row['label'] }}
@endif
{{ is_array($row['value'] ?? null) ? json_encode($row['value'], JSON_PRETTY_PRINT) : ($row['value'] ?? '-') }}
@else
@foreach ($block['entries'] ?? [] as $entry)
{{ $entry['key'] ?? '-' }}
{{ is_array($entry['value'] ?? null) ? json_encode($entry['value'], JSON_PRETTY_PRINT) : ($entry['value'] ?? '-') }}
@endforeach
@endif
@else
{{ $title }}
@if (($block['type'] ?? 'keyValue') === 'table') @php $columns = $block['columns'] ?? null; $hasColumns = is_array($columns) && ! empty($columns); $columnMeta = [ 'definitionId' => ['width' => 'w-[35%]', 'style' => 'width: 35%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], 'instanceType' => ['width' => 'w-[20%]', 'style' => 'width: 20%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], 'value' => ['width' => 'w-[25%]', 'style' => 'width: 25%;', 'cell' => 'break-words whitespace-pre-wrap', 'cellStyle' => 'overflow-wrap: anywhere; white-space: pre-wrap;'], 'path' => ['width' => 'w-[20%]', 'style' => 'width: 20%;', 'cell' => 'font-mono text-xs break-all whitespace-normal', 'cellStyle' => 'word-break: break-all; overflow-wrap: anywhere; white-space: normal;'], ]; @endphp
@if ($hasColumns) @foreach ($columns as $column) @php $key = $column['key'] ?? null; $meta = is_string($key) ? ($columnMeta[$key] ?? []) : []; @endphp @endforeach @else @endif @foreach ($block['rows'] ?? [] as $row) @if ($hasColumns) @foreach ($columns as $column) @php $key = $column['key'] ?? null; $cell = is_string($key) ? ($row[$key] ?? null) : null; $meta = is_string($key) ? ($columnMeta[$key] ?? []) : []; @endphp @endforeach @else @endif @endforeach
{{ $column['label'] ?? $column['key'] ?? '-' }}Path Value
@if (is_array($cell))
{{ json_encode($cell, JSON_PRETTY_PRINT) }}
@elseif (is_bool($cell)) {{ $cell ? 'true' : 'false' }} @else {{ $cell ?? '-' }} @endif
{{ $row['path'] ?? '-' }}
@if (! empty($row['label']))
{{ $row['label'] }}
@endif
{{ is_array($row['value'] ?? null) ? json_encode($row['value'], JSON_PRETTY_PRINT) : ($row['value'] ?? '-') }}
@else
@foreach ($block['entries'] ?? [] as $entry)
{{ $entry['key'] ?? '-' }}
{{ is_array($entry['value'] ?? null) ? json_encode($entry['value'], JSON_PRETTY_PRINT) : ($entry['value'] ?? '-') }}
@endforeach
@endif
@endif @endforeach