@php
$moduleCount = count($componentTree);
$sectionCount = collect($componentTree)->sum(fn ($module) => count($module['sections']));
$componentCount = collect($componentTree)
->sum(fn ($module) => collect($module['sections'])->sum(fn ($section) => count($section['components'])));
$selectedCount = count($selectedComponents);
@endphp
@error('userId')
{{ $message }}
@enderror
Modules: {{ $moduleCount }}
Sections: {{ $sectionCount }}
Components: {{ $componentCount }}
Selected: {{ $selectedCount }}
@if (empty($componentTree))
No active modules or components found for access configuration.
@else
@foreach ($componentTree as $module)
{{ $module['module_name'] }}
Module ID: {{ $module['module_id'] }}
Sections: {{ count($module['sections']) }}
@foreach ($module['sections'] as $section)
{{ $section['section_name'] }}
Section key: {{ $section['section_key'] }}
{{ count($section['components']) }} components
@foreach ($section['components'] as $component)
@endforeach
@endforeach
@endforeach
@endif