"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatDoctorCommand = formatDoctorCommand;
exports.formatDoctorGuidance = formatDoctorGuidance;
exports.formatMutationBoundaryNote = formatMutationBoundaryNote;
function formatDoctorCommand(appId) {
    return appId && appId.trim() !== '' ? `dominds doctor ${appId}` : 'dominds doctor';
}
function formatDoctorGuidance(params = {}) {
    const command = formatDoctorCommand(params.appId ?? null);
    const prefix = params.prefix ?? 'Diagnosis first:';
    const layerSummary = params.includeLayerSummary === false
        ? ''
        : ' declaration, lock, configuration, resolution, and fresh handshake';
    return `${prefix} run '${command}' before retrying or editing app state manually.${layerSummary}`;
}
function formatMutationBoundaryNote(params) {
    return (`${params.commandName} only updates ${params.layerDescription}; it does not prove that the app is healthy. ` +
        formatDoctorGuidance({
            appId: params.appId ?? null,
            prefix: 'If the result is not what you expected,',
            includeLayerSummary: true,
        }));
}
