@php $tenantDashboardStatusBadgeClasses = static fn (?string $tone): string => 'inline-flex items-center rounded-md border px-2 py-0.5 text-left text-xs font-medium leading-5 whitespace-normal break-words '.match ($tone) { 'danger' => 'border-danger-200 bg-danger-50 text-danger-700 dark:border-danger-800 dark:bg-danger-500/10 dark:text-danger-300', 'success' => 'border-success-200 bg-success-50 text-success-700 dark:border-success-800 dark:bg-success-500/10 dark:text-success-300', 'warning' => 'border-warning-200 bg-warning-50 text-warning-700 dark:border-warning-800 dark:bg-warning-500/10 dark:text-warning-300', 'info' => 'border-info-200 bg-info-50 text-info-700 dark:border-info-800 dark:bg-info-500/10 dark:text-info-300', 'primary' => 'border-primary-200 bg-primary-50 text-primary-700 dark:border-primary-800 dark:bg-primary-500/10 dark:text-primary-300', default => 'border-gray-200 bg-gray-50 text-gray-700 dark:border-white/10 dark:bg-white/5 dark:text-gray-200', }; $secondaryRecommendedActions = array_values(array_filter( $recommendedActions, static function (array $action) use ($operatorGuidance): bool { $guidanceKey = $operatorGuidance['key'] ?? null; $guidanceLabel = $operatorGuidance['actionLabel'] ?? null; $guidanceUrl = $operatorGuidance['actionUrl'] ?? null; if (($action['key'] ?? null) === $guidanceKey) { return false; } if ( ($action['actionLabel'] ?? null) === $guidanceLabel && ($action['actionUrl'] ?? null) === $guidanceUrl ) { return false; } return true; }, )); $operatorGuidanceKey = is_string($operatorGuidance['key'] ?? null) ? (string) $operatorGuidance['key'] : null; $useCompactRecommendedActions = $secondaryRecommendedActions !== [] && ( ($operatorGuidanceKey !== null && str_starts_with($operatorGuidanceKey, 'provider_readiness.')) || ($operatorGuidanceKey !== null && str_starts_with($operatorGuidanceKey, 'review_output.')) ); $recommendedActionsHeading = $useCompactRecommendedActions ? __('localization.dashboard.overview.section_additional_follow_ups') : __('localization.dashboard.overview.section_recommended_actions'); $recommendedActionsDescription = $useCompactRecommendedActions ? __('localization.dashboard.overview.section_additional_follow_ups_summary') : 'Recommended next actions are derived from repo-backed blockers and proof gaps.'; @endphp

{{ $readinessDecision['question'] ?? 'Is this environment ready, blocked, stale, or requiring review?' }}

{{ $readinessDecision['status'] ?? ($posture['status'] ?? __('localization.dashboard.overview.status_unavailable')) }}

{{ $readinessDecision['title'] ?? ($operatorGuidance['title'] ?? __('localization.dashboard.overview.environment_context_unavailable_headline')) }}

{{ $readinessDecision['statusLabel'] ?? 'Status' }}
{{ $readinessDecision['status'] ?? ($posture['status'] ?? __('localization.dashboard.overview.status_unavailable')) }}
{{ $readinessDecision['reasonLabel'] ?? 'Reason' }}
{{ $readinessDecision['reason'] ?? ($posture['headline'] ?? __('localization.dashboard.overview.tenant_context_unavailable_headline')) }}
{{ $readinessDecision['impactLabel'] ?? 'Why this matters' }}
{{ $readinessDecision['impact'] ?? ($posture['summary'] ?? __('localization.dashboard.overview.tenant_context_unavailable_summary')) }}
{{ $readinessDecision['nextActionLabel'] ?? __('localization.dashboard.overview.label_recommended_next_action') }}
{{ $readinessDecision['actionLabel'] ?? 'Review readiness proof' }}
@if (filled($readinessDecision['actionUrl'] ?? null)) {{ $readinessDecision['actionLabel'] ?? 'Review readiness proof' }} @else {{ $readinessDecision['actionLabel'] ?? 'Review readiness proof' }} @endif @if (filled($readinessDecision['helperText'] ?? null) || ($readinessDecision['secondaryActions'] ?? []) !== [])
@if (filled($readinessDecision['helperText'] ?? null))

{{ $readinessDecision['helperText'] }}

@endif @if (($readinessDecision['secondaryActions'] ?? []) !== [])
@foreach ($readinessDecision['secondaryActions'] as $secondaryAction) @if (filled($secondaryAction['actionUrl'] ?? null)) {{ $secondaryAction['actionLabel'] ?? __('localization.dashboard.overview.action_review_environment') }} @endif @endforeach
@endif
@endif
@forelse ($readinessDimensions as $dimension)
{{ $dimension['title'] ?? 'Readiness signal' }}
{{ $dimension['status'] ?? __('localization.dashboard.overview.status_unavailable') }}

{{ $dimension['description'] ?? '' }}

@empty
Readiness dimensions are unavailable until an environment context is selected.
@endforelse
{{ $recommendedActionsDescription }} @if ($secondaryRecommendedActions === [])
{{ __('localization.dashboard.overview.empty_recommended_actions_headline') }}

{{ __('localization.dashboard.overview.empty_recommended_actions_summary') }}

@elseif ($useCompactRecommendedActions)
@foreach (array_slice($secondaryRecommendedActions, 0, 2) as $index => $action)
@if (filled($action['icon'] ?? null)) @endif

{{ $action['title'] }}

Reason: {{ $action['reason'] }}

@if (filled($action['actionUrl'] ?? null)) {{ $action['actionLabel'] ?? 'Review' }} @endif
@endforeach
@else
@foreach (array_slice($secondaryRecommendedActions, 0, 3) as $index => $action)
{{ $index + 1 }}
@if (filled($action['icon'] ?? null)) @endif

{{ $action['title'] }}

Reason: {{ $action['reason'] }}

Impact: {{ $action['impact'] }}

@if (filled($action['actionUrl'] ?? null))
{{ $action['actionLabel'] ?? 'Review' }}
@endif
@endforeach
@endif
Additional readiness signals used to explain the current recommendation.
@if ($supportingSignals === [])
Supporting signals are unavailable until an environment context is selected.
@else
@foreach ($supportingSignals as $signal) @endforeach
Signal State Action
{{ $signal['label'] ?? 'Readiness signal' }} {{ $signal['value'] ?? __('localization.dashboard.overview.status_unavailable') }} @if (filled($signal['actionLabel'] ?? null)) @if (filled($signal['actionUrl'] ?? null) && ! ($signal['actionDisabled'] ?? false)) {{ $signal['actionLabel'] }} @else {{ $signal['actionLabel'] }} @endif @endif
@endif
{{ $diagnosticsDisclosure['label'] ?? 'Diagnostics - Collapsed' }}

{{ $diagnosticsDisclosure['summary'] ?? 'Support diagnostics stay closed by default and require the existing diagnostics capability.' }}

@foreach ($readinessProofPanel as $proof)
{{ $proof['label'] ?? 'Proof path' }}
{{ $proof['value'] ?? __('localization.dashboard.overview.status_unavailable') }}

{{ $proof['description'] ?? '' }}

@if (filled($proof['actionLabel'] ?? null))
@if (filled($proof['actionUrl'] ?? null)) {{ $proof['actionLabel'] }} @else {{ $proof['actionLabel'] }} @endif
@endif
@endforeach