'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: {
        place: {
          serviceConfig: {
            serviceName: 'Places',
            servicePath: 'placeauthorities',
            serviceType: 'authority',

            objectName: 'Placeitem',

            documentName: 'places',

            quickAddData: function quickAddData(values) {
              return {
                document: {
                  '@name': 'places',
                  'ns2:places_common': {
                    '@xmlns:ns2': 'http://collectionspace.org/services/place',
                    placeTermGroupList: {
                      placeTermGroup: {
                        termDisplayName: values.displayName
                      }
                    }
                  }
                }
              };
            }
          },
          messages: {
            record: (0, _reactIntl.defineMessages)({
              name: {
                'id': 'record.place.name',
                'defaultMessage': 'Place'
              },
              collectionName: {
                'id': 'record.place.collectionName',
                'defaultMessage': 'Places'
              }
            })
          },
          forms: {
            default: _react2.default.createElement('div', null)
          },
          title: function title() {
            return '';
          },
          vocabularies: {
            all: {
              isCreatable: false,
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.place.all.name',
                  'defaultMessage': 'All'
                },
                collectionName: {
                  'id': 'vocab.place.all.collectionName',
                  'defaultMessage': 'All Places'
                }
              }),
              serviceConfig: {
                servicePath: '_ALL_'
              },
              type: 'all'
            },
            local: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.place.local.name',
                  'defaultMessage': 'Local'
                },
                collectionName: {
                  'id': 'vocab.place.local.collectionName',
                  'defaultMessage': 'Local Places'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(place)'
              }
            },
            tgn: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  'id': 'vocab.place.tgn.name',
                  'defaultMessage': 'TGN'
                },
                collectionName: {
                  'id': 'vocab.place.tgn.collectionName',
                  'defaultMessage': 'TGN Places'
                }
              }),
              serviceConfig: {
                servicePath: 'urn:cspace:name(tgn_place)'
              }
            }
          }
        }
      }
    };
  };
};