"use client"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card"; import { DataTable, Column } from "@/components/ui/DataTable"; import { Loader2, Plus } from "lucide-react"; import { Agent } from "@/lib/actions/agentsCore"; interface AgentsTableSectionProps { agents: Agent[]; isLoading: boolean; columns: Column[]; role: string | null; onProvisionClick?: () => void; } export default function AgentsTableSection({ agents, isLoading, columns, role, onProvisionClick, }: AgentsTableSectionProps) { return ( Provisioned Network Agents ({agents.length}) {(role === 'SUPER_ADMIN' || role === 'TENANT_ADMIN') && onProvisionClick && ( )} {isLoading ? (
) : ( { const q = query.toLowerCase(); return ( (row.uuid || "").toLowerCase().includes(q) || (row.serial || "").toLowerCase().includes(q) || (row.label || "").toLowerCase().includes(q) ); }} /> )}
); }