import type { FC } from "react";

// 提供 SVG 箭头 marker 定义，供 Edge 组件引用
export const ArrowMarkers: FC = () => (
  <>
    <marker
      id="arrow-default"
      viewBox="0 0 10 10"
      refX="10"
      refY="5"
      markerWidth="3"
      markerHeight="3"
      orient="auto"
    >
      <path
        d="M 0 0 L 10 5 L 0 10 z"
        fill="#4e79a7"
      />
    </marker>
    <marker
      id="arrow-success"
      viewBox="0 0 10 10"
      refX="10"
      refY="5"
      markerWidth="3"
      markerHeight="3"
      orient="auto"
    >
      <path
        d="M 0 0 L 10 5 L 0 10 z"
        fill="#00c853"
      />
    </marker>
    <marker
      id="arrow-error"
      viewBox="0 0 10 10"
      refX="10"
      refY="5"
      markerWidth="3"
      markerHeight="3"
      orient="auto"
    >
      <path
        d="M 0 0 L 10 5 L 0 10 z"
        fill="#f44336"
      />
    </marker>
    <marker
      id="arrow-running"
      viewBox="0 0 10 10"
      refX="10"
      refY="5"
      markerWidth="3"
      markerHeight="3"
      orient="auto"
    >
      <path
        d="M 0 0 L 10 5 L 0 10 z"
        fill="#ff9800"
      />
    </marker>
    <marker
      id="arrow-selected"
      viewBox="0 0 10 10"
      refX="10"
      refY="5"
      markerWidth="3"
      markerHeight="3"
      orient="auto"
    >
      <path
        d="M 0 0 L 10 5 L 0 10 z"
        fill="#ff6b6b"
      />
    </marker>
  </>
);
