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

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

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