{{ t('department_statistics') }}

{{ t('overview_of_department_metrics') }}

{{ $stats['total_departments'] }}
{{ t('total_departments') }}
{{ $stats['active_departments'] }}
{{ t('active_departments') }}
@if($stats['total_departments'] > 0)
{{ round(($stats['active_departments'] / $stats['total_departments']) * 100) }}%
@endif
{{ $stats['inactive_departments'] }}
{{ t('inactive_departments') }}
@if($stats['total_departments'] > 0)
{{ round(($stats['inactive_departments'] / $stats['total_departments']) * 100) }}%
@endif
{{ $stats['departments_with_tickets'] }}
{{ t('with_tickets') }}
{{ $stats['departments_without_tickets'] }}
{{ t('without_tickets') }}
{{ number_format($stats['total_tickets']) }}
{{ t('total_tickets') }}
@if($stats['tickets_by_department']->isNotEmpty())

{{ t('top_departments') }}

{{ t('ranked_by_activity') }}

{{ t('top') }} {{ $stats['tickets_by_department']->count() }}
@foreach($stats['tickets_by_department'] as $index => $department)
@if($index === 0) 1 @elseif($index === 1) 2 @elseif($index === 2) 3 @endif

{{ $department->name }}

{{ $department->status ? t('active') : t('inactive') }}
@if($department->description)

{{ Str::limit($department->description, 60) }}

@endif
{{ number_format($department->tickets_count) }}
{{ $department->tickets_count === 1 ? t('ticket') : t('tickets') }}
@if($index < 3)
@endif
@endforeach
@else

{{ t('no_department_data') }}

{{ t('no_departments_with_tickets_found') }}

@endif