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

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

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