package com.cameleer.server.core.diagram;

import java.util.List;

/**
 * A node with computed layout position and dimensions.
 * <p>
 * For compound nodes (CHOICE, SPLIT, TRY_CATCH, etc.), {@code children}
 * contains the nested child nodes rendered inside the parent bounds.
 *
 * @param id          node identifier (matches RouteNode.id)
 * @param label       display label
 * @param type        NodeType name (e.g., "ENDPOINT", "PROCESSOR")
 * @param x           horizontal position
 * @param y           vertical position
 * @param width       node width
 * @param height      node height
 * @param children    nested child nodes for compound/swimlane groups
 * @param endpointUri the Camel endpoint URI (e.g., "direct:processOrder"), null for non-endpoint nodes
 */
public record PositionedNode(
        String id,
        String label,
        String type,
        double x,
        double y,
        double width,
        double height,
        List<PositionedNode> children,
        String endpointUri
) {
}
