@php $singleRootMode = count($tree) === 1 && count($tree[0]['children']) > 1; $rootNode = $singleRootMode ? $tree[0] : null; $splitNodes = $singleRootMode ? $rootNode['children'] : $tree; $third = (int) ceil(count($splitNodes) / 3); $treeColumns = [ array_slice($splitNodes, 0, $third), array_slice($splitNodes, $third, $third), array_slice($splitNodes, $third * 2), ]; @endphp @if($tree === [])
{{ __('modules.hr.resources_views_partials_department_tree_content.text_dc161373e8') }}
@else @if($singleRootMode)

{{ $rootNode['name'] }}

{{ $rootNode['employees_summary'] }}

@endif
@foreach($treeColumns as $columnNodes) @if($columnNodes !== []) @endif @endforeach
@endif