@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'; $decisionSpec = \App\Support\Badges\BadgeRenderer::spec(\App\Support\Badges\BadgeDomain::RestorePreviewDecision, $decision); @endphp
{{ $item['sourceName'] ?? $item['sourceId'] ?? 'Foundation' }} {{ $decisionSpec->label }}
{{ $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) @php $restoreMode = $item['restore_mode'] ?? null; @endphp
{{ $item['policy_identifier'] ?? 'Policy' }}
@if ($restoreMode === 'preview-only') @php $restoreModeSpec = \App\Support\Badges\BadgeRenderer::spec(\App\Support\Badges\BadgeDomain::PolicyRestoreMode, $restoreMode); @endphp {{ $restoreModeSpec->label }} @endif {{ $item['action'] ?? 'action' }}
{{ $item['policy_type'] ?? 'type' }} • {{ $item['platform'] ?? 'platform' }}
@if (! empty($item['validation_warning']))
{{ $item['validation_warning'] }}
@endif @if (! empty($item['compliance_action_warning']))
{{ $item['compliance_action_warning'] }}
@endif @if (! empty($item['compliance_action_summary']) && is_array($item['compliance_action_summary'])) @php $summary = $item['compliance_action_summary']; $missingTemplates = $item['compliance_action_missing_templates'] ?? []; $total = (int) ($summary['total'] ?? 0); $missing = (int) ($summary['missing'] ?? 0); @endphp
Compliance notifications: {{ $total }} total • {{ $missing }} missing
@if (! empty($missingTemplates) && is_array($missingTemplates))
Missing notification templates
@foreach ($missingTemplates as $templateId)
{{ $templateId }}
@endforeach
@endif @endif
@endforeach
@endif
@endif