"use client";

import { memo } from "react";
import { NodeProps } from "reactflow";
import { Database } from "lucide-react";
import { CompactNodeShell } from "./CompactNodeShell";

export const ProcedureCallActionNode = memo(({ data, selected }: NodeProps<any>) => {
  const summary = data.procedureName
    ? `${data.procedureName}()`
    : "프로시저를 선택해 주세요";

  return (
    <CompactNodeShell
      color="#8B5CF6"
      label={data.displayName || "프로시저 호출"}
      summary={summary}
      icon={<Database className="h-3.5 w-3.5" />}
      selected={selected}
    />
  );
});

ProcedureCallActionNode.displayName = "ProcedureCallActionNode";
