'use strict';

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

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

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


  return {
    'ns2:collectionspace_core': {
      createdAt: {
        [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: {
        [config]: {
          view: {
            type: TextInput
          }
        }
      },
      updatedAt: {
        [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: {
        [config]: {
          messages: (0, _reactIntl.defineMessages)({
            name: {
              'id': 'field.ext.core.updatedBy.name',
              'defaultMessage': 'Last updated by'
            }
          }),
          view: {
            type: TextInput
          }
        }
      }
    }
  };
};