import React from "react";
import { FiLink } from "react-icons/fi";
import type { GraphNode } from "../types";

interface GraphStatusBarProps {
  isLinkMode: boolean;
  selectedNode: GraphNode | null;
}

export const GraphStatusBar: React.FC<GraphStatusBarProps> = ({
  isLinkMode,
  selectedNode,
}) => {
  if (!isLinkMode) return null;

  return (
    <div
      className="absolute bottom-4 left-4 text-white px-3 py-1 rounded-lg text-sm flex items-center gap-2"
      style={{ backgroundColor: "#22c55e" }}
    >
      <FiLink /> Режим создания связей: кликните на два узла для соединения
      {selectedNode && (
        <span className="ml-2">Выбран: {selectedNode.name}</span>
      )}
    </div>
  );
};
