'use strict';

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

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

exports.default = function (pluginContext) {
  var _personTermGroup, _personTermGroupList, _ns2Persons_common, _document;

  var _pluginContext$inputC = pluginContext.inputComponents,
      AuthorityControlledInput = _pluginContext$inputC.AuthorityControlledInput,
      CompoundInput = _pluginContext$inputC.CompoundInput,
      TextInput = _pluginContext$inputC.TextInput;
  var config = pluginContext.configHelpers.configKey;


  return {
    document: (_document = {}, _defineProperty(_document, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:persons_common'
        }
      }
    }), _defineProperty(_document, 'ns2:persons_common', (_ns2Persons_common = {}, _defineProperty(_ns2Persons_common, config, {
      service: {
        ns: 'http://collectionspace.org/services/person'
      }
    }), _defineProperty(_ns2Persons_common, 'personTermGroupList', (_personTermGroupList = {}, _defineProperty(_personTermGroupList, config, {
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_personTermGroupList, 'personTermGroup', (_personTermGroup = {}, _defineProperty(_personTermGroup, config, {
      view: {
        type: CompoundInput,
        props: {
          repeating: true
        }
      }
    }), _defineProperty(_personTermGroup, 'termDisplayName', _defineProperty({}, config, {
      view: {
        type: TextInput
      }
    })), _defineProperty(_personTermGroup, 'termSource', _defineProperty({}, config, {
      view: {
        type: AuthorityControlledInput,
        props: {
          authority: 'citation/local,citation/shared,citation/worldcat'
        }
      }
    })), _personTermGroup)), _personTermGroupList)), _ns2Persons_common)), _document)
  };
};