import type { FlowTalkerDto } from "@mmapp/contracts/traffic-flow" export function matchesMapService(row: Pick, label: string, country?: string) { const service = row.service === label || row.category === label && (row.service === "Прочее" || ["DNS", "SSH", "BGP"].includes(label)) if (!service || !country) return service return country === "unknown" ? !row.dstCountry || row.dstCountry.toLowerCase() === "unknown" : row.dstCountry?.toUpperCase() === country.toUpperCase() }