'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: {
        citation: {
          serviceConfig: {
            serviceName: 'Citations',
            servicePath: 'citationauthorities',
            serviceType: 'authority',

            objectName: 'Citation',

            documentName: 'citations',

            quickAddData: function quickAddData(values) {
              return {
                document: {
                  '@name': 'citations',
                  'ns2:citations_common': {
                    '@xmlns:ns2': 'http://collectionspace.org/services/citation',
                    citationTermGroupList: {
                      citationTermGroup: {
                        termDisplayName: values.displayName
                      }
                    }
                  }
                }
              };
            }
          },
          messages: {
            record: (0, _reactIntl.defineMessages)({
              name: {
                'id': 'record.citation.name',
                'defaultMessage': 'Citation'
              },
              collectionName: {
                'id': 'record.citation.collectionName',
                'defaultMessage': 'Citations'
              }
            })
          },
          forms: {
            default: _react2.default.createElement('div', null)
          },
          title: function title() {
            return '';
          },
          vocabularies: {
            all: {
              isCreatable: false,
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.citation.all.name',
                  'defaultMessage': 'All'
                },
                collectionName: {
                  'id': 'vocab.citation.all.collectionName',
                  'defaultMessage': 'All Citations'
                }
              }),
              serviceConfig: {
                servicePath: '_ALL_'
              },
              type: 'all'
            },
            local: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.citation.local.name',
                  'defaultMessage': 'Local'
                },
                collectionName: {
                  'id': 'vocab.citation.local.collectionName',
                  'defaultMessage': 'Local Citations'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(citation)'
              }
            },
            worldcat: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.citation.worldcat.name',
                  'defaultMessage': 'WorldCat'
                },
                collectionName: {
                  'id': 'vocab.citation.worldcat.collectionName',
                  'defaultMessage': 'WorldCat Citations'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(worldcat)'
              }
            }
          }
        }
      }
    };
  };
};