'use strict';

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

var _reactIntl = require('react-intl');

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; }

exports.default = function (pluginContext) {
  var DATA_TYPE_DATETIME = pluginContext.dataTypes.DATA_TYPE_DATETIME;
  var config = pluginContext.configHelpers.configKey;
  var _pluginContext$inputC = pluginContext.inputComponents,
      TextInput = _pluginContext$inputC.TextInput,
      DateInput = _pluginContext$inputC.DateInput,
      DateTimeInput = _pluginContext$inputC.DateTimeInput;


  return {
    'ns2:collectionspace_core': {
      createdAt: _defineProperty({}, config, {
        dataType: DATA_TYPE_DATETIME,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.ext.core.createdAt.name',
            'defaultMessage': 'Created time'
          }
        }),
        searchView: {
          type: DateInput
        },
        view: {
          type: DateTimeInput,
          props: {
            readOnly: true
          }
        }
      }),
      createdBy: _defineProperty({}, config, {
        view: {
          type: TextInput
        }
      }),
      updatedAt: _defineProperty({}, config, {
        dataType: DATA_TYPE_DATETIME,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.ext.core.updatedAt.name',
            'defaultMessage': 'Last updated time'
          }
        }),
        searchView: {
          type: DateInput
        },
        view: {
          type: DateTimeInput,
          props: {
            readOnly: true
          }
        }
      }),
      updatedBy: _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.ext.core.updatedBy.name',
            'defaultMessage': 'Last updated by'
          }
        }),
        view: {
          type: TextInput
        }
      })
    }
  };
};