| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 1 | import { Handle, Position } from "@xyflow/react"; |
| 2 | import { ReactElement } from "react"; |
| 3 | import { v4 as uuidv4 } from "uuid"; |
| 4 | |
| 5 | export class PortOut { |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 6 | public readonly id: string; |
| 7 | // private name: string; |
| 8 | // private value: number; |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 9 | |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 10 | constructor() { |
| 11 | this.id = uuidv4(); |
| 12 | // this.name = ""; |
| 13 | // this.value = 0; |
| 14 | } |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 15 | |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 16 | public handle(): ReactElement { |
| 17 | return <Handle id={this.id} type={"source"} position={Position.Top} />; |
| 18 | } |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 19 | } |