'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _VIEW$EDIT;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _StaticDisplay = require('./StaticDisplay');

var _StaticDisplay2 = _interopRequireDefault(_StaticDisplay);

var _constant = require('../../constant');

var _mxa = require('../../../../../components/mxa');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
                                                                                                                                                                                                                   * Created by baoyinghai on 11/17/16.
                                                                                                                                                                                                                   */


var compRender = function compRender(config) {
  var record = config.record,
      props = config.props;

  return _react2.default.createElement(_mxa.Switch, { disabled: record.isReadonly || props.isModalInputMappingItem && props.isLeadInto && props.modalInputIsReadonly });
};

exports.default = (_VIEW$EDIT = {}, _defineProperty(_VIEW$EDIT, _constant.VIEW, _StaticDisplay2.default), _defineProperty(_VIEW$EDIT, _constant.EDIT, compRender), _VIEW$EDIT);