'use strict';

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

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

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 _emailGroup, _emailGroupList, _telephoneNumberGroup, _telephoneNumberGroup2, _faxNumberGroup, _faxNumberGroupList, _webAddressGroup, _webAddressGroupList, _addressGroup, _addressGroupList, _ns2Contacts_common, _document;

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


  return {
    document: (_document = {}, _defineProperty(_document, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:contacts_common'
        }
      }
    }), _defineProperty(_document, 'ns2:contacts_common', (_ns2Contacts_common = {}, _defineProperty(_ns2Contacts_common, config, {
      service: {
        ns: 'http://collectionspace.org/services/contact'
      }
    }), _defineProperty(_ns2Contacts_common, 'emailGroupList', (_emailGroupList = {}, _defineProperty(_emailGroupList, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.emailGroupList.name',
          'defaultMessage': 'Email'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_emailGroupList, 'emailGroup', (_emailGroup = {}, _defineProperty(_emailGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_emailGroup, 'email', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.email.name',
          'defaultMessage': 'Address'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_emailGroup, 'emailType', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.emailType.name',
          'defaultMessage': 'Type'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'emailTypes'
        }
      }
    })), _emailGroup)), _emailGroupList)), _defineProperty(_ns2Contacts_common, 'telephoneNumberGroupList', (_telephoneNumberGroup2 = {}, _defineProperty(_telephoneNumberGroup2, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.telephoneNumberGroupList.name',
          'defaultMessage': 'Phone'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_telephoneNumberGroup2, 'telephoneNumberGroup', (_telephoneNumberGroup = {}, _defineProperty(_telephoneNumberGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_telephoneNumberGroup, 'telephoneNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.telephoneNumber.name',
          'defaultMessage': 'Number'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_telephoneNumberGroup, 'telephoneNumberType', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.telephoneNumberType.name',
          'defaultMessage': 'Type'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'telephoneNumberTypes'
        }
      }
    })), _telephoneNumberGroup)), _telephoneNumberGroup2)), _defineProperty(_ns2Contacts_common, 'faxNumberGroupList', (_faxNumberGroupList = {}, _defineProperty(_faxNumberGroupList, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.faxNumberGroupList.name',
          'defaultMessage': 'Fax'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_faxNumberGroupList, 'faxNumberGroup', (_faxNumberGroup = {}, _defineProperty(_faxNumberGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_faxNumberGroup, 'faxNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.faxNumber.name',
          'defaultMessage': 'Number'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_faxNumberGroup, 'faxNumberType', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.faxNumberType.name',
          'defaultMessage': 'Type'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'faxNumberTypes'
        }
      }
    })), _faxNumberGroup)), _faxNumberGroupList)), _defineProperty(_ns2Contacts_common, 'webAddressGroupList', (_webAddressGroupList = {}, _defineProperty(_webAddressGroupList, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.webAddressGroupList.name',
          'defaultMessage': 'Web site'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_webAddressGroupList, 'webAddressGroup', (_webAddressGroup = {}, _defineProperty(_webAddressGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_webAddressGroup, 'webAddress', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.webAddress.name',
          'defaultMessage': 'URL'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_webAddressGroup, 'webAddressType', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.webAddressTypeType.name',
          'defaultMessage': 'Type'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'webAddressTypes'
        }
      }
    })), _webAddressGroup)), _webAddressGroupList)), _defineProperty(_ns2Contacts_common, 'addressGroupList', (_addressGroupList = {}, _defineProperty(_addressGroupList, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressGroupList.name',
          'defaultMessage': 'Address'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_addressGroupList, 'addressGroup', (_addressGroup = {}, _defineProperty(_addressGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_addressGroup, 'addressType', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressType.name',
          'defaultMessage': 'Type'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'addressTypes'
        }
      }
    })), _defineProperty(_addressGroup, 'addressPlace1', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressPlace1.name',
          'defaultMessage': 'Line 1'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_addressGroup, 'addressPlace2', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressPlace2.name',
          'defaultMessage': 'Line 2'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_addressGroup, 'addressMunicipality', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressMunicipality.name',
          'defaultMessage': 'Municipality'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_addressGroup, 'addressStateOrProvince', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressStateOrProvince.name',
          'defaultMessage': 'State/province'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_addressGroup, 'addressPostCode', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressPostCode.name',
          'defaultMessage': 'Postal code'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_addressGroup, 'addressCountry', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.contacts_common.addressCountry.name',
          'defaultMessage': 'Country'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'addressCountries'
        }
      }
    })), _addressGroup)), _addressGroupList)), _ns2Contacts_common)), _document)
  };
};