<!-- resources/views/livewire/toolbar.blade.php -->
@props(['project', 'currentFolder'=> null]) <!-- Definir props -->

<div class="flex items-center justify-between space-x-4 border-t pt-4 mt-4">
    <!-- Grupo izquierdo: Acciones básicas -->
    <div class="flex items-center space-x-2">
        <!-- Crear nueva carpeta -->
        @if($currentFolder)
            <button wire:click="$emit('showCreateFolderModal',  {{ $currentFolder->id }})" 
                    class="px-3 py-2 text-sm bg-white border rounded-lg hover:bg-gray-50">
                <x-icons icon="folder-add" class="w-5 h-5 mr-1 text-blue-600" />
                Nueva Carpeta
            </button>
        @endif

         <!-- Input de archivo con folder actual -->
    

        <!-- Subir archivos -->    
        <input type="file"  id="file-input"  wire:model="files" data-folder-id="{{ $currentFolder?->id }}"  multiple class="hidden">

        <button wire:click="$emit('showUploadModal')"
                class="px-3 py-2 text-sm bg-white border rounded-lg hover:bg-gray-50">
            <x-icons icon="upload" class="w-5 h-5 mr-1 text-green-600" />
            Subir Archivos
        </button>
    </div>

    <!-- Grupo derecho: Acciones contextuales -->
    <div class="flex items-center space-x-2">
        @if($currentFolder)
        <span class="text-sm text-gray-500">
            <x-icons icon="folder" class="w-4 h-4 inline mr-1 text-yellow-500" />
            {{ $currentFolder->name }}
        </span>
        @endif
    </div>
</div>