"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { Handle, Position } from "@xyflow/react";
import { WorkflowNodeCard } from "../WorkflowNodeCard.js";
function mapStatus(status) {
  if (!status || status === "pending") return "not_started";
  if (status === "running" || status === "in_progress") return "in_progress";
  if (status === "completed") return "completed";
  return "not_started";
}
function ParallelJoinNode({ data, isConnectable, selected }) {
  const nodeData = data;
  return /* @__PURE__ */ jsxs("div", { className: "parallel-join-node", title: nodeData.tooltip, children: [
    /* @__PURE__ */ jsx(
      Handle,
      {
        type: "target",
        position: Position.Top,
        id: "target",
        isConnectable,
        className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
      }
    ),
    /* @__PURE__ */ jsx(
      WorkflowNodeCard,
      {
        title: nodeData.label,
        description: nodeData.description,
        status: mapStatus(nodeData.status),
        nodeType: "parallelJoin",
        selected
      }
    ),
    /* @__PURE__ */ jsx(
      Handle,
      {
        type: "source",
        position: Position.Bottom,
        id: "source",
        isConnectable,
        className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
      }
    )
  ] });
}
export {
  ParallelJoinNode
};
//# sourceMappingURL=ParallelJoinNode.js.map
