@php $insights = is_array($insightCards ?? null) ? array_values(array_filter($insightCards, fn ($c) => is_array($c))) : []; $typeStyles = ['warning' => 'border-warning/20 bg-warning/5', 'success' => 'border-primary/20 bg-primary/5', 'info' => 'border-info/20 bg-info/5']; $iconStyles = ['warning' => 'text-warning bg-warning/10', 'success' => 'text-primary bg-primary/10', 'info' => 'text-info bg-info/10']; $warningInsights = collect($insights)->where('type', 'warning')->values()->all(); $successInsights = collect($insights)->where('type', 'success')->values()->all(); $infoInsights = collect($insights)->where('type', 'info')->values()->all(); $priorityActions = collect($insights) ->filter(fn ($ins) => in_array(($ins['type'] ?? 'info'), ['warning', 'info'], true)) ->take(3) ->values() ->all(); $health = is_array($health ?? null) ? $health : ['show' => false]; $score = $health['score'] ?? null; $dash = $score !== null ? min(100, max(0, (int) $score)) * 2.64 : 0; @endphp
{{ __('budgets.insights_page.health_empty_title') }}
{{ __('budgets.insights_page.health_empty_body') }}
{{ __('budgets.insights_page.health_body_live') }}
{{ $health['savingsPct'] !== null ? number_format((float) $health['savingsPct'], 0).'%' : __('budgets.insights_page.metric_na') }}
{{ __('budgets.insights_page.metric_savings') }}
{{ $health['debtIncomePct'] !== null ? number_format((float) $health['debtIncomePct'], 0).'%' : __('budgets.insights_page.metric_na') }}
{{ __('budgets.insights_page.metric_debt_income') }}
@if (($health['subLoadLabelKey'] ?? null) !== null) {{ __('budgets.insights_page.metric_sub_load_'.$health['subLoadLabelKey']) }} @else {{ __('budgets.insights_page.metric_na') }} @endif
{{ __('budgets.insights_page.metric_sub_load_label') }}
{{ __('budgets.insights_page.cards_empty_hint') }}
@else{{ __('budgets.insights_page.action_prefix', ['number' => $index + 1]) }} ยท {{ $ins['title'] ?? '' }}
{{ $ins['text'] ?? '' }}
{{ __('budgets.insights_page.cards_empty_title') }}
{{ __('budgets.insights_page.cards_empty_hint') }}
{{ $ins['title'] ?? '' }}
{{ $ins['text'] ?? '' }}
{{ $ins['title'] ?? '' }}
{{ $ins['text'] ?? '' }}
{{ $ins['title'] ?? '' }}
{{ $ins['text'] ?? '' }}