import { IGenericSection, IGenericInput } from '../../../generic/types';
import { IInputText } from '../../types';

export const transformInputText = (msg: IInputText): IGenericSection => {
  const result: IGenericSection = {
    type: 'section',
    children: []
  };

  const input: IGenericInput = {
    type: 'input',
    props: {
      label: msg.label
    }
  };

  result.children.push(input);

  return result;
};