@php $diff = $getState() ?? []; $summary = $diff['summary'] ?? []; $added = is_array($diff['added'] ?? null) ? $diff['added'] : []; $removed = is_array($diff['removed'] ?? null) ? $diff['removed'] : []; $changed = is_array($diff['changed'] ?? null) ? $diff['changed'] : []; $renderRow = static function (array $row): array { return [ 'include_exclude' => (string) ($row['include_exclude'] ?? 'include'), 'target_label' => (string) ($row['target_label'] ?? 'Unknown target'), 'filter_type' => (string) ($row['filter_type'] ?? 'none'), 'filter_id' => $row['filter_id'] ?? null, 'intent' => $row['intent'] ?? null, 'mode' => $row['mode'] ?? null, ]; }; @endphp
{{ (int) ($summary['added'] ?? 0) }} added {{ (int) ($summary['removed'] ?? 0) }} removed {{ (int) ($summary['changed'] ?? 0) }} changed @if (($summary['truncated'] ?? false) === true) Truncated to {{ (int) ($summary['limit'] ?? 0) }} items @endif
@if ($changed !== [])
@foreach ($changed as $row) @php $to = is_array($row['to'] ?? null) ? $renderRow($row['to']) : $renderRow([]); $from = is_array($row['from'] ?? null) ? $renderRow($row['from']) : $renderRow([]); @endphp
{{ $to['target_label'] }}
From
Type: {{ $from['include_exclude'] }}
Filter: {{ $from['filter_type'] }}@if($from['filter_id']) ({{ $from['filter_id'] }})@endif
To
Type: {{ $to['include_exclude'] }}
Filter: {{ $to['filter_type'] }}@if($to['filter_id']) ({{ $to['filter_id'] }})@endif
@endforeach
@endif @if ($added !== [])
@foreach ($added as $row) @php $row = $renderRow(is_array($row) ? $row : []); @endphp
{{ $row['target_label'] }}
{{ $row['include_exclude'] }} · filter: {{ $row['filter_type'] }}
@endforeach
@endif @if ($removed !== [])
@foreach ($removed as $row) @php $row = $renderRow(is_array($row) ? $row : []); @endphp
{{ $row['target_label'] }}
{{ $row['include_exclude'] }} · filter: {{ $row['filter_type'] }}
@endforeach
@endif