'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 _acquisitionDateGroup2, _acquisitionSources, _owners, _acquisitionFunding, _acquisitionFundingLi, _fieldCollectionEvent2, _ns2Acquisitions_com, _document;

  var _pluginContext$inputC = pluginContext.inputComponents,
      AutocompleteInput = _pluginContext$inputC.AutocompleteInput,
      CompoundInput = _pluginContext$inputC.CompoundInput,
      DateInput = _pluginContext$inputC.DateInput,
      IDGeneratorInput = _pluginContext$inputC.IDGeneratorInput,
      OptionPickerInput = _pluginContext$inputC.OptionPickerInput,
      StructuredDateInput = _pluginContext$inputC.StructuredDateInput,
      TermPickerInput = _pluginContext$inputC.TermPickerInput,
      TextInput = _pluginContext$inputC.TextInput;
  var config = pluginContext.configHelpers.configKey;
  var _pluginContext$dataTy = pluginContext.dataTypes,
      DATA_TYPE_DATETIME = _pluginContext$dataTy.DATA_TYPE_DATETIME,
      DATA_TYPE_INT = _pluginContext$dataTy.DATA_TYPE_INT;


  return {
    document: (_document = {}, _defineProperty(_document, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:acquisitions_common'
        }
      }
    }), _defineProperty(_document, 'ns2:collectionspace_core', {
      createdAt: _defineProperty({}, config, {
        dataType: DATA_TYPE_DATETIME,
        view: {
          type: DateInput
        }
      }),
      createdBy: _defineProperty({}, config, {
        view: {
          type: TextInput
        }
      }),
      updatedAt: _defineProperty({}, config, {
        dataType: DATA_TYPE_DATETIME,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.collectionspace_core.updatedAt.name',
            'defaultMessage': 'Last updated time'
          }
        }),
        view: {
          type: DateInput
        }
      }),
      updatedBy: _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.collectionspace_core.updatedBy.name',
            'defaultMessage': 'Last updated by'
          }
        }),
        view: {
          type: TextInput
        }
      })
    }), _defineProperty(_document, 'ns2:acquisitions_common', (_ns2Acquisitions_com = {}, _defineProperty(_ns2Acquisitions_com, config, {
      service: {
        ns: 'http://collectionspace.org/services/acquisition'
      }
    }), _defineProperty(_ns2Acquisitions_com, 'acquisitionReferenceNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionReferenceNumber.name',
          'defaultMessage': 'Acquisition reference number'
        }
      }),
      required: true,
      searchView: {
        type: TextInput
      },
      view: {
        type: IDGeneratorInput,
        props: {
          idGeneratorName: 'accession,archives,library'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'accessionDateGroup', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.accessionDateGroup.name',
          'defaultMessage': 'Accession date'
        }
      }),
      view: {
        type: StructuredDateInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionAuthorizer', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionAuthorizer.name',
          'defaultMessage': 'Acquisition authorizer'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionAuthorizerDate', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionAuthorizerDate.name',
          'defaultMessage': 'Acquisition authorizer date'
        }
      }),
      view: {
        type: DateInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionDateGroupList', (_acquisitionDateGroup2 = {}, _defineProperty(_acquisitionDateGroup2, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionDateGroupList.name',
          'defaultMessage': 'Acquisition date'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_acquisitionDateGroup2, 'acquisitionDateGroup', _defineProperty({}, config, {
      repeating: true,
      view: {
        type: StructuredDateInput
      }
    })), _acquisitionDateGroup2)), _defineProperty(_ns2Acquisitions_com, 'acquisitionMethod', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionMethod.name',
          'defaultMessage': 'Acquisition method'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'acquisitionMethod'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionSources', (_acquisitionSources = {}, _defineProperty(_acquisitionSources, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionSources.name',
          'defaultMessage': 'Acquisition source'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_acquisitionSources, 'acquisitionSource', _defineProperty({}, config, {
      repeating: true,
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionSource.name',
          'defaultMessage': 'Acquisition source'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _acquisitionSources)), _defineProperty(_ns2Acquisitions_com, 'owners', (_owners = {}, _defineProperty(_owners, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.owners.name',
          'defaultMessage': 'Owner'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_owners, 'owner', _defineProperty({}, config, {
      repeating: true,
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _owners)), _defineProperty(_ns2Acquisitions_com, 'transferOfTitleNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.transferOfTitleNumber.name',
          'defaultMessage': 'Transfer of title number'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'creditLine', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.creditLine.name',
          'defaultMessage': 'Credit line'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'groupPurchasePriceCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.groupPurchasePriceCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'groupPurchasePriceValue', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.groupPurchasePriceValue.name',
          'defaultMessage': 'Value'
        }
      }),
      dataType: DATA_TYPE_INT,
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectOfferPriceCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectOfferPriceCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectOfferPriceValue', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectOfferPriceValue.name',
          'defaultMessage': 'Value'
        }
      }),
      dataType: DATA_TYPE_INT,
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectPurchaseOfferPriceCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectPurchaseOfferPriceCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectPurchaseOfferPriceValue', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectPurchaseOfferPriceValue.name',
          'defaultMessage': 'Value'
        }
      }),
      dataType: DATA_TYPE_INT,
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectPurchasePriceCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectPurchasePriceCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'objectPurchasePriceValue', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.objectPurchasePriceValue.name',
          'defaultMessage': 'Value'
        }
      }),
      dataType: DATA_TYPE_INT,
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'originalObjectPurchasePriceCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.originalObjectPurchasePriceCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'originalObjectPurchasePriceValue', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.originalObjectPurchasePriceValue.name',
          'defaultMessage': 'Value'
        }
      }),
      dataType: DATA_TYPE_INT,
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionReason', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionReason.name',
          'defaultMessage': 'Acquisition reason'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionNote', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionNote.name',
          'defaultMessage': 'Acquisition note'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionProvisos', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionProvisos.name',
          'defaultMessage': 'Acquisition provisos'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Acquisitions_com, 'acquisitionFundingList', (_acquisitionFundingLi = {}, _defineProperty(_acquisitionFundingLi, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionFundingList.name',
          'defaultMessage': 'Acquisition funding'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_acquisitionFundingLi, 'acquisitionFunding', (_acquisitionFunding = {}, _defineProperty(_acquisitionFunding, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_acquisitionFunding, 'acquisitionFundingCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionFundingCurrency.name',
          'defaultMessage': 'Currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_acquisitionFunding, 'acquisitionFundingValue', _defineProperty({}, config, {
      dataType: DATA_TYPE_INT,
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionFundingValue.name',
          'defaultMessage': 'Value'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_acquisitionFunding, 'acquisitionFundingSource', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.acquisitionFundingSource.name',
          'defaultMessage': 'Funding source'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _defineProperty(_acquisitionFunding, 'acquisitionFundingSourceProvisos', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquistions_common.acquisitionFundingSourceProvisos.name',
          'defaultMessage': 'Source provisos'
        }
      }),
      view: {
        type: TextInput
      }
    })), _acquisitionFunding)), _acquisitionFundingLi)), _defineProperty(_ns2Acquisitions_com, 'fieldCollectionEventNames', (_fieldCollectionEvent2 = {}, _defineProperty(_fieldCollectionEvent2, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.acquisitions_common.fieldCollectionEventNames.name',
          'defaultMessage': 'Field collection event name'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_fieldCollectionEvent2, 'fieldCollectionEventName', _defineProperty({}, config, {
      repeating: true,
      view: {
        type: TextInput
      }
    })), _fieldCollectionEvent2)), _ns2Acquisitions_com)), _document)
  };
};