"use client"; import { Handle, Position, type NodeProps } from "@xyflow/react"; import { Activity, Database, KeyRound, Laptop, Network, Server, Shield, User, } from "lucide-react"; import type { ZTNodeData } from "./types"; import { cn } from "@/lib/utils"; const kindIcon = { user: User, device: Laptop, idp: KeyRound, gateway: Shield, workload: Server, data: Database, network: Network, monitoring: Activity, }; const handleClass = "!h-2 !w-2 !border-cosmos-500 !bg-araucaria-400"; export function ZTFlowNode({ data }: NodeProps) { const d = data as ZTNodeData; const Icon = kindIcon[d.kind]; return (

{d.role}

{d.label}

); }