import { CANVAS_NODE_WIDTH, CANVAS_NODE_HEIGHT, SENTINEL_NODE_WIDTH, SENTINEL_NODE_HEIGHT, } from "./canvas-constants.js";
const TASK_CARD = {
    visualClass: "task-card",
    defaultWidth: CANVAS_NODE_WIDTH,
    defaultHeight: CANVAS_NODE_HEIGHT,
    captionHeight: 0,
    portPattern: "standard",
    isContainer: false,
    ariaShapeLabel: "card",
};
const DECISION_DIAMOND = {
    visualClass: "decision-diamond",
    defaultWidth: 140,
    defaultHeight: 120,
    captionHeight: 24,
    portPattern: "branch-per-case",
    isContainer: false,
    ariaShapeLabel: "diamond",
};
const PARALLEL_BAR = {
    visualClass: "parallel-bar",
    defaultWidth: 260,
    defaultHeight: 32,
    captionHeight: 0,
    portPattern: "branch-per-branch",
    isContainer: false,
    ariaShapeLabel: "horizontal bar",
};
const EVENT_CIRCLE = {
    visualClass: "event-circle",
    defaultWidth: 80,
    defaultHeight: 70,
    captionHeight: 20,
    portPattern: "standard",
    isContainer: false,
    ariaShapeLabel: "circle",
};
const GATE_OCTAGON = {
    visualClass: "gate-octagon",
    defaultWidth: 160,
    defaultHeight: 140,
    captionHeight: 24,
    portPattern: "branch-per-outcome",
    isContainer: false,
    ariaShapeLabel: "octagon",
};
const SUBWORKFLOW_CARD = {
    visualClass: "subworkflow-card",
    defaultWidth: CANVAS_NODE_WIDTH,
    defaultHeight: CANVAS_NODE_HEIGHT,
    captionHeight: 0,
    portPattern: "standard",
    isContainer: false,
    ariaShapeLabel: "sub-workflow card",
};
const CONTAINER = {
    visualClass: "container",
    defaultWidth: 280,
    defaultHeight: 120,
    captionHeight: 0,
    portPattern: "container",
    isContainer: true,
    ariaShapeLabel: "container",
};
const TERMINAL_PILL = {
    visualClass: "terminal-pill",
    defaultWidth: SENTINEL_NODE_WIDTH,
    defaultHeight: SENTINEL_NODE_HEIGHT,
    captionHeight: 0,
    portPattern: "source-only",
    isContainer: false,
    ariaShapeLabel: "pill",
};
const TERMINAL_PILL_END = {
    ...TERMINAL_PILL,
    portPattern: "sink-only",
};
/**
 * Static registry mapping every workflow task kind string to its
 * visual specification.
 *
 * Includes all 20 `WorkflowTaskKind` enum values plus the two
 * sentinel pseudo-kinds (`__start__`, `__end__`).
 *
 * Frozen to prevent accidental mutation — this is static metadata
 * that must not change at runtime.
 */
export const VISUAL_REGISTRY = Object.freeze(new Map([
    // ai
    ["agent_call", TASK_CARD],
    ["llm_call", TASK_CARD],
    ["eval", TASK_CARD],
    // control_flow
    ["switch_case", DECISION_DIAMOND],
    ["for_each", CONTAINER],
    ["fork", PARALLEL_BAR],
    ["try_catch", CONTAINER],
    ["wait", EVENT_CIRCLE],
    // invocation
    ["http_call", TASK_CARD],
    ["grpc_call", TASK_CARD],
    ["activity_call", TASK_CARD],
    ["run_workflow", SUBWORKFLOW_CARD],
    // data
    ["set_vars", TASK_CARD],
    ["transform", TASK_CARD],
    ["validate", TASK_CARD],
    // governance
    ["human_input", GATE_OCTAGON],
    // event
    ["listen", EVENT_CIRCLE],
    ["emit_event", EVENT_CIRCLE],
    ["notification", EVENT_CIRCLE],
    ["raise_error", EVENT_CIRCLE],
    // sentinels
    ["__start__", TERMINAL_PILL],
    ["__end__", TERMINAL_PILL_END],
]));
const DEFAULT_SPEC = TASK_CARD;
/**
 * Returns the visual specification for a task kind string.
 *
 * Falls back to `task-card` for unknown kinds, ensuring a valid spec
 * is always returned even for future task kinds not yet in the registry.
 */
export function getVisualSpec(kind) {
    return VISUAL_REGISTRY.get(kind) ?? DEFAULT_SPEC;
}
//# sourceMappingURL=task-type-visual-registry.js.map