'use strict';

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

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

var _columns = require('./columns');

var _columns2 = _interopRequireDefault(_columns);

var _fields = require('./fields');

var _fields2 = _interopRequireDefault(_fields);

var _forms = require('./forms');

var _forms2 = _interopRequireDefault(_forms);

var _messages = require('./messages');

var _messages2 = _interopRequireDefault(_messages);

var _serviceConfig = require('./serviceConfig');

var _serviceConfig2 = _interopRequireDefault(_serviceConfig);

var _title = require('./title');

var _title2 = _interopRequireDefault(_title);

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

exports.default = function () {
  return function (pluginContext) {
    return {
      recordTypes: {
        person: {
          columns: _columns2.default,
          messages: _messages2.default,
          serviceConfig: _serviceConfig2.default,
          fields: (0, _fields2.default)(pluginContext),
          forms: (0, _forms2.default)(pluginContext),
          title: (0, _title2.default)(pluginContext),
          vocabularies: {
            all: {
              isCreatable: false,
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.person.all.name',
                  'defaultMessage': 'All'
                },
                collectionName: {
                  'id': 'vocab.person.all.collectionName',
                  'defaultMessage': 'All Persons'
                }
              }),
              serviceConfig: {
                servicePath: '_ALL_'
              },
              type: 'all'
            },
            local: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.person.local.name',
                  'defaultMessage': 'Local'
                },
                collectionName: {
                  'id': 'vocab.person.local.collectionName',
                  'defaultMessage': 'Local Persons'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(person)'
              }
            },
            ulan: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.person.ulan.name',
                  'defaultMessage': 'ULAN'
                },
                collectionName: {
                  'id': 'vocab.person.ulan.collectionName',
                  'defaultMessage': 'ULAN Persons'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(ulan_pa)'
              }
            }
          }
        }
      }
    };
  };
};