'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 _ns2Groups_common, _document;

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


  return {
    document: (_document = {}, _defineProperty(_document, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:groups_common'
        }
      }
    }), _defineProperty(_document, 'ns2:groups_common', (_ns2Groups_common = {}, _defineProperty(_ns2Groups_common, config, {
      service: {
        ns: 'http://collectionspace.org/services/group'
      }
    }), _defineProperty(_ns2Groups_common, 'title', _defineProperty({}, config, {
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Groups_common, 'responsibleDepartment', _defineProperty({}, config, {
      view: {
        type: OptionListControlledInput,
        props: {
          optionListName: 'departments'
        }
      }
    })), _defineProperty(_ns2Groups_common, 'owner', _defineProperty({}, config, {
      view: {
        type: AuthorityControlledInput,
        props: {
          authority: 'person/local'
        }
      }
    })), _defineProperty(_ns2Groups_common, 'scopeNote', _defineProperty({}, config, {
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _ns2Groups_common)), _document)
  };
};