import { useTranslation } from "react-i18next";
import { EyeOff, List } from "lucide-react";
import ContextMenu from "./ContextMenu";

export interface ChartContextMenuProps {
  x: number;
  y: number;
  categoryName: string;
  onHide: () => void;
  onViewDetails: () => void;
  onClose: () => void;
}

export default function ChartContextMenu({
  x,
  y,
  categoryName,
  onHide,
  onViewDetails,
  onClose,
}: ChartContextMenuProps) {
  const { t } = useTranslation();

  return (
    <ContextMenu
      x={x}
      y={y}
      header={categoryName}
      onClose={onClose}
      items={[
        {
          icon: <List size={14} />,
          label: t("charts.viewTransactions"),
          onClick: onViewDetails,
        },
        {
          icon: <EyeOff size={14} />,
          label: t("charts.hideCategory"),
          onClick: onHide,
        },
      ]}
    />
  );
}
