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

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

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