import { useContext } from "react"; import { useTranslation } from "react-i18next"; import { Handle, Node, NodeProps, Position } from "@xyflow/react"; import Base from "./Base"; import { BusContext } from "../Bus"; export type ToshoListed = Node<{ prime: boolean, standard: boolean, growth: boolean, }, "fetch_ToshoListed">; export function ToshoListed(node: NodeProps) { const {id, data} = node; const {t} = useTranslation(); const bus = useContext(BusContext); if (bus === undefined) { throw Error("bus is not installed"); } const update = (market: string, value: boolean)=> bus.emit("reqModifyNode", {id: id, data: {[market]: value}}); return (
); }