@php $preview = $getState() ?? []; $foundationItems = collect($preview)->filter(function ($item) { return is_array($item) && array_key_exists('decision', $item) && array_key_exists('sourceId', $item); }); $policyItems = collect($preview)->reject(function ($item) { return is_array($item) && array_key_exists('decision', $item) && array_key_exists('sourceId', $item); }); @endphp @if (empty($preview))

No preview available.

@else
@if ($foundationItems->isNotEmpty())
Foundations
@foreach ($foundationItems as $item) @php $decision = $item['decision'] ?? 'mapped_existing'; $decisionColor = match ($decision) { 'created' => 'text-green-700 bg-green-100 border-green-200', 'created_copy' => 'text-amber-900 bg-amber-100 border-amber-200', 'mapped_existing' => 'text-blue-700 bg-blue-100 border-blue-200', 'failed' => 'text-red-700 bg-red-100 border-red-200', 'skipped' => 'text-amber-900 bg-amber-50 border-amber-200', default => 'text-gray-700 bg-gray-100 border-gray-200', }; @endphp
{{ $item['sourceName'] ?? $item['sourceId'] ?? 'Foundation' }} {{ $decision }}
{{ $item['type'] ?? 'foundation' }}
@if (! empty($item['targetName']))
Target: {{ $item['targetName'] }}
@endif @if (! empty($item['reason']))
{{ $item['reason'] }}
@endif
@endforeach
@endif @if ($policyItems->isNotEmpty())
Policies
@foreach ($policyItems as $item)
{{ $item['policy_identifier'] ?? 'Policy' }} {{ $item['action'] ?? 'action' }}
{{ $item['policy_type'] ?? 'type' }} • {{ $item['platform'] ?? 'platform' }}
@if (! empty($item['validation_warning']))
{{ $item['validation_warning'] }}
@endif
@endforeach
@endif
@endif