/**
 * LeagueCoverViewDataBuilder
 *
 * Transforms MediaBinaryDTO into LeagueCoverViewData for server-side rendering.
 * Deterministic; side-effect free; no HTTP calls.
 */

import { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
import { LeagueCoverViewData } from '@/lib/view-data/LeagueCoverViewData';

export class LeagueCoverViewDataBuilder {
  static build(apiDto: MediaBinaryDTO): LeagueCoverViewData {
    return {
      buffer: Buffer.from(apiDto.buffer).toString('base64'),
      contentType: apiDto.contentType,
    };
  }
}