@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; $policyType = $state['policy_type'] ?? null; $stringifyValue = function (mixed $value): string { if (is_null($value)) { return 'N/A'; } if (is_bool($value)) { return $value ? 'Enabled' : 'Disabled'; } if (is_scalar($value)) { return (string) $value; } if (is_array($value)) { $encoded = json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); return is_string($encoded) ? $encoded : 'N/A'; } if (is_object($value)) { if (method_exists($value, '__toString')) { return (string) $value; } $encoded = json_encode((array) $value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); return is_string($encoded) ? $encoded : 'N/A'; } return 'N/A'; }; $shouldRenderBadges = function (mixed $value): bool { if (! is_array($value) || $value === []) { return false; } if (! array_is_list($value)) { return false; } foreach ($value as $item) { if (! is_scalar($item) && ! is_null($item)) { return false; } } return true; }; $asEnabledDisabledBadgeValue = function (mixed $value): ?bool { if (is_bool($value)) { return $value; } if (! is_string($value)) { return null; } $normalized = strtolower(trim($value)); return match ($normalized) { 'enabled', 'true', 'yes', '1' => true, 'disabled', 'false', 'no', '0' => false, default => null, }; }; @endphp
{{ (string) $row['path'] }}
@endif @if(!empty($row['description'])){{ Str::limit($row['description'], 80) }}
@endif{{ $code }}
@endif
No settings data available
This policy may not contain settings, or they are in an unsupported format