/**
 * Created by baoyinghai on 11/20/16.
 */
import React from 'react';
import staticDisplay from './StaticDisplay';
import { VIEW, EDIT } from '../../constant';
import { Radio } from '../../../../../components/mxa';

const compRender = config => {
  const { record, props } = config;
  return (
    <Radio disabled={record.isReadonly || (props.isModalInputMappingItem && props.isLeadInto && props.modalInputIsReadonly)} />
  );
};

export default {
  [VIEW]: staticDisplay,
  [EDIT]: compRender
};
