'use strict';

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

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

exports.default = configContext => {
  const DATA_TYPE_DATETIME = configContext.dataTypes.DATA_TYPE_DATETIME;
  const config = configContext.configHelpers.configKey;
  var _configContext$inputC = configContext.inputComponents;
  const TextInput = _configContext$inputC.TextInput,
        DateInput = _configContext$inputC.DateInput,
        DateTimeInput = _configContext$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
          }
        }
      }
    }
  };
};