"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveNestedWorkflowExpansion = resolveNestedWorkflowExpansion;
const validation_1 = require("./validation");
function resolveNestedWorkflowExpansion(input) {
    const result = (0, validation_1.validateWorkflowTemplateTree)(input);
    if (result.diagnostics.length > 0) {
        return {
            kind: "invalid",
            diagnostics: result.diagnostics,
        };
    }
    return {
        kind: "ok",
        directChildWorkflows: result.directChildWorkflows,
    };
}
