import { Search, X, ArrowDownUp } from 'lucide-react' import { tagColor } from './TagInput' export const STATUS_FILTERS = [ { value: 'all', label: 'Tous' }, { value: 'online', label: 'En ligne' }, { value: 'offline', label: 'Hors ligne' }, { value: 'issues', label: 'Problèmes' }, ] export const SORT_OPTIONS = [ { value: 'name', label: 'Nom' }, { value: 'status', label: 'État' }, { value: 'cpu', label: 'CPU' }, { value: 'ram', label: 'RAM' }, { value: 'containers', label: 'Conteneurs' }, ] export default function DashboardToolbar({ search, onSearchChange, searchRef, status, onStatusChange, tags, activeTags, onToggleTag, sort, onSortChange, shown, total, }) { const filtering = search.trim() !== '' || status !== 'all' || activeTags.length > 0 return (
{/* Recherche */}
onSearchChange(e.target.value)} placeholder="Rechercher un VPS, un conteneur, une image… ( / )" aria-label="Rechercher un VPS ou un conteneur" className="w-full bg-gray-900 border border-gray-800 rounded-xl pl-9 pr-9 py-2 text-sm placeholder-gray-600 focus:outline-none focus:border-indigo-500 transition-colors" /> {search && ( )}
{/* Filtre d'état */}
{STATUS_FILTERS.map(opt => ( ))}
{/* Tri */}
{/* Tags + compteur */} {(tags.length > 0 || filtering) && (
{tags.map(tag => { const active = activeTags.includes(tag) return ( ) })} {filtering && ( {shown} / {total} VPS affiché{shown !== 1 ? 's' : ''} )}
)}
) }