import { LLDPNeighbor } from "@hooks/stores"; import { GridCard } from "@components/Card"; import { cx } from "@/cva.config"; import { m } from "@localizations/messages"; interface LLDPDataLineProps { label: string; value: string; className?: string; } const LLDPDataLine = ({ label, value, className }: LLDPDataLineProps) => { return (
{label} {value}
); } export default function LLDPNeighborsCard({ neighbors, }: { neighbors: LLDPNeighbor[]; }) { return (

{m.network_ll_dp_neighbors()}

{neighbors.map(neighbor => { const displayName = neighbor.system_name || neighbor.port_description || neighbor.mac; const key = `${neighbor.mac}-${neighbor.source}`; return

{displayName}

{neighbor.system_name && ( )} {neighbor.system_description && ( )} {neighbor.chassis_id && ( )} {neighbor.port_id && ( )} {neighbor.port_description && ( )} {neighbor.management_addresses && neighbor.management_addresses.length > 0 && ( neighbor.management_addresses.map((address, index) => ( )) )} {neighbor.mac && ( )} {neighbor.source && ( )}
})}
); }