/**
 * Output Format Utilities
 *
 * Provides utilities for formatting output in multiple formats:
 * - Table (default, clean text-based layout)
 * - JSON (structured data)
 * - YAML (human-readable structured data)
 *
 * @module output
 */
import { safeYamlDump } from '../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js';
import { TableFormatter } from './tables.js';
/**
 * Output formatter for multiple formats
 */
export class OutputFormatter {
    /**
     * Formats data according to the specified output format
     */
    static format(data, format, dbMeta) {
        switch (format) {
            case 'table':
                return OutputFormatter.formatAsTable(data, dbMeta);
            case 'json':
                return OutputFormatter.formatAsJSON(data);
            case 'yaml':
                return OutputFormatter.formatAsYAML(data);
        }
    }
    /**
     * Formats data as a clean text display
     */
    static formatAsTable(data, dbMeta) {
        return TableFormatter.createSettingsTable(data, dbMeta);
    }
    /**
     * Formats data as JSON
     */
    static formatAsJSON(data) {
        return JSON.stringify(data, null, 2);
    }
    /**
     * Formats data as YAML
     */
    static formatAsYAML(data) {
        return safeYamlDump(data);
    }
}
