{isLoading ? (
{[...Array(3)].map((_, i) => (
))}
) : error ? (

{error}

Check your connection and try again

) : filteredItems.length === 0 ? (

{searchQuery ? 'Nothing matches' : 'All caught up'}

{searchQuery ? 'No collections match your search.' : statusFilter === 'assigned' ? 'No assigned collections right now. New pickups will appear here.' : statusFilter === 'collection_pool' ? 'Collection pool is empty — nothing to claim right now.' : 'No problems reported. Nice work.'}

) : (
{groupMode === 'supplier' ? ( groupedArray.map(({ supplier, items: supplierItems }, groupIdx) => { const color = SUPPLIER_COLORS[groupIdx % SUPPLIER_COLORS.length]; const isExpanded = expandedSuppliers.has(supplier!.id); return ( toggleSupplier(supplier!.id)} onCollect={(item) => { setSelectedItem(item); setShowCollectModal(true); }} onProblem={(item) => { setSelectedItem(item); setShowProblemModal(true); }} onNavigate={handleNavigate} onShowDetails={handleShowDetails} /> ); }) ) : ( areaClusters.map((cluster, clusterIdx) => { const color = SUPPLIER_COLORS[clusterIdx % SUPPLIER_COLORS.length]; const isExpanded = expandedAreas.has(cluster.id); return ( toggleArea(cluster.id)} onCollect={(item) => { setSelectedItem(item); setShowCollectModal(true); }} onProblem={(item) => { setSelectedItem(item); setShowProblemModal(true); }} onNavigate={handleNavigate} onShowDetails={handleShowDetails} /> ); }) )}
)}