@php $stats = $publicStats ?? [ 'registered_devices' => 0, 'recovered_devices' => 0, 'monthly_reports' => 0, 'top_types' => [], 'top_names' => [], ]; @endphp

{{ __('messages.public_statistics_title') }}

{{ __('messages.public_statistics_subtitle') }}

{{ __('messages.public_total_registered_devices') }}

{{ number_format((int) ($stats['registered_devices'] ?? 0)) }}

{{ __('messages.public_total_recovered_devices') }}

{{ number_format((int) ($stats['recovered_devices'] ?? 0)) }}

{{ __('messages.public_reports_this_month') }}

{{ number_format((int) ($stats['monthly_reports'] ?? 0)) }}

{{ __('messages.public_top_device_type') }}

{{ data_get($stats, 'top_types.0.label', __('messages.no_data')) }}

{{ __('messages.public_most_repeated_types') }}

@if (! empty($stats['top_types']))
    @foreach ($stats['top_types'] as $item)
  • {{ $item['label'] }} {{ number_format((int) $item['count']) }}
  • @endforeach
@else

{{ __('messages.no_data') }}

@endif

{{ __('messages.public_most_repeated_names') }}

@if (! empty($stats['top_names']))
    @foreach ($stats['top_names'] as $item)
  • {{ $item['name'] }} {{ number_format((int) $item['count']) }}
  • @endforeach
@else

{{ __('messages.no_data') }}

@endif