///|
/// Minimal runnable example: node changes, edge geometry and drag interaction.
/// Run with `moon run cmd/main` from the project root.
fn main {
  let nodes = [
    @graph.FlowNode::at("a", 0.0, 0.0),
    @graph.FlowNode::at("b", 240.0, 120.0),
  ]
  let edges = [@graph.FlowEdge::between("a", "b", "a-b")]
  let nodes = @graph.apply_node_changes(nodes, [
    @graph.NodeChange::Position(id="a", x=40.0, y=60.0, dragging=false),
  ])
  println("node a: (\{nodes[0].x}, \{nodes[0].y})")
  let path = @geometry.bezier_path(
    @geometry.Point::{ x: 100.0, y: 80.0, },
    @geometry.Right,
    @geometry.Point::{ x: 300.0, y: 200.0, },
    @geometry.Left,
    0.25,
  )
  println("edge path: \{path.path}")
  let editor = @interaction.Editor::fresh(nodes, edges)
  let step = @interaction.pointer_down(
    editor, 40.0, 60.0, 0, "", false, false, "",
  )
  println("mode after pointer down: \{step.editor.mode}")
}