// Frozen format table for Quality Intelligence export adapters (Epic #270, Issue #283).
//
// Reuses the `QualityIntelligenceExportAdapter` discriminator from
// `@oscharko-dev/keiko-contracts` so the adapter id is the single source of truth.
// The local re-export under the name `QualityIntelligenceExportFormat` is the
// type alias the public spec calls for; downstream callers may import either
// name.
//
// Pure-domain leaf. NO IO. NO new runtime dependency.
const descriptor = (format, bytesPerRowHint, filenameExtension) => Object.freeze({ format, adapterId: format, bytesPerRowHint, filenameExtension });
/**
 * Frozen lookup table mapping format → adapter descriptor. Eleven formats,
 * mirrors `QUALITY_INTELLIGENCE_EXPORT_ADAPTERS` exactly.
 */
export const QUALITY_INTELLIGENCE_EXPORT_FORMAT_TABLE = Object.freeze({
    "jira-issues": descriptor("jira-issues", 512, "csv"),
    qtest: descriptor("qtest", 384, "csv"),
    xray: descriptor("xray", 384, "csv"),
    polarion: descriptor("polarion", 384, "csv"),
    alm: descriptor("alm", 384, "csv"),
    csv: descriptor("csv", 256, "csv"),
    json: descriptor("json", 1024, "json"),
    "spreadsheet-safe-csv": descriptor("spreadsheet-safe-csv", 256, "csv"),
    markdown: descriptor("markdown", 512, "md"),
    "plain-text": descriptor("plain-text", 384, "txt"),
    "quality-center": descriptor("quality-center", 384, "txt"),
});
/**
 * Returns the descriptor for `format`. Pure lookup; the table is frozen at
 * module load so the returned reference is stable for the process lifetime.
 */
export function getExportFormatDescriptor(format) {
    return QUALITY_INTELLIGENCE_EXPORT_FORMAT_TABLE[format];
}
