@php $diff = $getState() ?? ['summary' => [], 'added' => [], 'removed' => [], 'changed' => []]; $summary = $diff['summary'] ?? []; $groupByBlock = static function (array $items): array { $groups = []; foreach ($items as $path => $value) { if (! is_string($path) || $path === '') { continue; } $parts = explode(' > ', $path, 2); if (count($parts) === 2) { [$group, $label] = $parts; } else { $group = 'Other'; $label = $path; } $groups[$group][$label] = $value; } ksort($groups); return $groups; }; $stringify = static function (mixed $value): string { if ($value === null) { return '—'; } if (is_bool($value)) { return $value ? 'Enabled' : 'Disabled'; } if (is_scalar($value)) { return (string) $value; } return json_encode($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?: ''; }; $isExpandable = static function (mixed $value): bool { if (is_array($value)) { return true; } return is_string($value) && strlen($value) > 160; }; @endphp
{{ $fromText }}
{{ $toText }}
{{ $text }}