import type { NodeProps } from "@xyflow/react";

import type { DiagramNode } from "../graph";

export function BpmnGroupNode({ data }: NodeProps) {
  const d = data as unknown as DiagramNode & { label: string };

  return (
    <div
      className="bpmn-group"
      style={{
        width: "100%",
        height: "100%",
        ...(d.color ? { borderColor: d.color } : {}),
      }}
    >
      {d.label && <div className="bpmn-group-label">{d.label}</div>}
    </div>
  );
}
