{{-- Recursive folder tree component for sidebar navigation --}}
@php
$isReadOnly = $isReadOnly ?? false;
@endphp
@foreach($folders as $folder)
@php
$folderId = (string) $folder['id'];
$hasChildren = count($folder['children']) > 0;
@endphp
{{-- Chevron toggle --}}
@if($hasChildren)
@else
@endif
{{-- Folder icon and name (clickable to navigate) --}}
{{-- Right side container for badge/actions --}}
{{-- File count badge (shown when not hovered or always in read-only mode) --}}
@if($folder['file_count'] > 0)
{{ $folder['file_count'] }}
@endif
@if(!$isReadOnly)
{{-- Hover actions (shown when hovered) --}}