'use client'; import { Input } from '@/components/ui/Input'; import { Pill } from '@/components/ui/Pill'; import type { ClientStatusFilter } from './clients/types'; interface ClientsFiltersProps { search: string; onSearchChange: (value: string) => void; status: ClientStatusFilter; onStatusChange: (status: ClientStatusFilter) => void; counts: Record; } const FILTERS: { key: ClientStatusFilter; label: string }[] = [ { key: 'all', label: 'All' }, { key: 'online', label: 'Online' }, { key: 'offline', label: 'Offline' }, { key: 'pending', label: 'Pending' }, ]; export function ClientsFilters({ search, onSearchChange, status, onStatusChange, counts, }: ClientsFiltersProps) { return (
onSearchChange(event.target.value)} placeholder="Search client..." className="bg-[var(--surface)]" />
{FILTERS.map((filter) => ( onStatusChange(filter.key)} > {filter.label} {counts[filter.key].toLocaleString()} ))}
); }