'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

exports.default = function () {
  return function () {
    return {
      recordTypes: {
        organization: {
          serviceConfig: {
            serviceName: 'Organizations',
            servicePath: 'orgauthorities',
            serviceType: 'authority',

            objectName: 'Organization',

            documentName: 'organizations',

            quickAddData: function quickAddData(values) {
              return {
                document: {
                  '@name': 'organizations',
                  'ns2:organizations_common': {
                    '@xmlns:ns2': 'http://collectionspace.org/services/organization',
                    orgTermGroupList: {
                      orgTermGroup: {
                        termDisplayName: values.displayName
                      }
                    }
                  }
                }
              };
            }
          },
          messages: {
            record: (0, _reactIntl.defineMessages)({
              name: {
                'id': 'record.organization.name',
                'defaultMessage': 'Organization'
              },
              collectionName: {
                'id': 'record.organization.collectionName',
                'defaultMessage': 'Organizations'
              }
            })
          },
          forms: {
            default: _react2.default.createElement('div', null)
          },
          title: function title() {
            return '';
          },
          vocabularies: {
            all: {
              isCreatable: false,
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.organization.all.name',
                  'defaultMessage': 'All'
                },
                collectionName: {
                  'id': 'vocab.organization.all.collectionName',
                  'defaultMessage': 'All Organizations'
                }
              }),
              serviceConfig: {
                servicePath: '_ALL_'
              },
              type: 'all'
            },
            local: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.organization.local.name',
                  'defaultMessage': 'Local'
                },
                collectionName: {
                  'id': 'vocab.organization.local.collectionName',
                  'defaultMessage': 'Local Organizations'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(organization)'
              }
            },
            ulan: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.organization.ulan.name',
                  'defaultMessage': 'ULAN'
                },
                collectionName: {
                  'id': 'vocab.organization.ulan.collectionName',
                  'defaultMessage': 'ULAN Organizations'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(ulan_oa)'
              }
            }
          }
        }
      }
    };
  };
};