import { IGenericSection, IGenericImage } from '../../../generic/types';
import { IOutputImage } from '../../types';

export const transformOutputImage = (msg: IOutputImage): IGenericSection => {
  const image: IGenericImage = {
    type: 'image',
    props: {
      url: msg.value
    }
  };

  const result: IGenericSection = {
    type: 'section',
    children: [image]
  };

  return result;
};