// Plain-text (.txt) export. One trimmed segment per line, no timestamps.

import type { Segment } from '../types';

/**
 * Render segments as plain text: each segment's trimmed text on its own line.
 * No timestamps, no numbering. Empty input yields an empty string.
 */
export function toTxt(segments: Segment[]): string {
  if (segments.length === 0) return '';
  return segments.map((seg) => seg.text.trim()).join('\n');
}
