"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildWorkflowReplanReason = buildWorkflowReplanReason;
exports.formatWorkflowReplanSummary = formatWorkflowReplanSummary;
exports.buildTemplateDriftReplanReason = buildTemplateDriftReplanReason;
const catalog_1 = require("../i18n/catalog");
function buildWorkflowReplanReason(input) {
    return (input.reason?.trim() ||
        buildDefaultWorkflowReplanReason(input.responseLanguage));
}
function formatWorkflowReplanSummary(input) {
    return `${(0, catalog_1.translate)(input.responseLanguage, "workflow.replan.heading")}\n\n${buildWorkflowReplanReason(input)}`;
}
function buildDefaultWorkflowReplanReason(responseLanguage) {
    return (0, catalog_1.translate)(responseLanguage, "workflow.replan.defaultReason");
}
function buildTemplateDriftReplanReason(responseLanguage) {
    return (0, catalog_1.translate)(responseLanguage, "workflow.replan.templateDriftReason");
}
