"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderWorkerWorkflowOptionSelectedTemplateContext = renderWorkerWorkflowOptionSelectedTemplateContext;
function renderWorkerWorkflowOptionSelectedTemplateContext(selectedWorkflowTemplate, helpers) {
    if (selectedWorkflowTemplate === null) {
        return [`  - ${helpers.noneText}`];
    }
    const lines = [
        `  - templatePath: ${selectedWorkflowTemplate.templatePath}`,
        `  - description: ${helpers.renderNullableValue(selectedWorkflowTemplate.description ?? null)}`,
    ];
    const surface = selectedWorkflowTemplate.workflowSurface;
    if (surface !== undefined) {
        lines.push(`  - workflowSurface: ${surface}`);
    }
    if (selectedWorkflowTemplate.requiredSkills !== undefined) {
        lines.push(`  - requires.skills: ${renderListValue(selectedWorkflowTemplate.requiredSkills, helpers.noneText)}`);
    }
    if (selectedWorkflowTemplate.requiredMcp !== undefined) {
        lines.push(`  - requires.mcp: ${renderListValue(selectedWorkflowTemplate.requiredMcp, helpers.noneText)}`);
    }
    if (selectedWorkflowTemplate.templateBody != null) {
        lines.push("  - templateBody:", ...selectedWorkflowTemplate.templateBody
            .split("\n")
            .map((line) => `    ${line}`));
    }
    return lines;
}
function renderListValue(values, noneText) {
    return values.length === 0 ? noneText : values.join(", ");
}
