'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 _exitMethods, _deacApprovalGroup, _deacApprovalGroupLis, _ns2Objectexit_commo, _document;

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


  return {
    document: (_document = {}, _defineProperty(_document, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:objectexit_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:objectexit_common', (_ns2Objectexit_commo = {}, _defineProperty(_ns2Objectexit_commo, config, {
      service: {
        ns: 'http://collectionspace.org/services/objectexit'
      }
    }), _defineProperty(_ns2Objectexit_commo, 'exitNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitNumber.name',
          'defaultMessage': 'Exit number'
        }
      }),
      required: true,
      searchView: {
        type: TextInput
      },
      view: {
        type: IDGeneratorInput,
        props: {
          idGeneratorName: 'objectexit'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'currentOwner', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.currentOwner.name',
          'defaultMessage': 'Current owner'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'depositor', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.depositor.name',
          'defaultMessage': 'Depositor'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'exitDateGroup', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitDateGroup.name',
          'defaultMessage': 'Exit date'
        }
      }),
      view: {
        type: StructuredDateInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'exitMethods', (_exitMethods = {}, _defineProperty(_exitMethods, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitMethods.name',
          'defaultMessage': 'Exit methods'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_exitMethods, 'exitMethod', _defineProperty({}, config, {
      repeating: true,
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitMethod.name',
          'defaultMessage': 'Exit method'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'exitMethod'
        }
      }
    })), _exitMethods)), _defineProperty(_ns2Objectexit_commo, 'exitNote', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitNote.name',
          'defaultMessage': 'Exit note'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'exitReason', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.exitReason.name',
          'defaultMessage': 'Exit reason'
        }
      }),
      view: {
        type: OptionPickerInput,
        props: {
          source: 'exitReason'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'packingNote', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.packingNote.name',
          'defaultMessage': 'Packing note'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalNewObjectNumber', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalNewObjectNumber.name',
          'defaultMessage': 'Disposal new object number'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'deacApprovalGroupList', (_deacApprovalGroupLis = {}, _defineProperty(_deacApprovalGroupLis, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deacApprovalGroupList.name',
          'defaultMessage': 'Deaccession approval group'
        }
      }),
      view: {
        type: CompoundInput
      }
    }), _defineProperty(_deacApprovalGroupLis, 'deacApprovalGroup', (_deacApprovalGroup = {}, _defineProperty(_deacApprovalGroup, config, {
      repeating: true,
      view: {
        type: CompoundInput,
        props: {
          tabular: true
        }
      }
    }), _defineProperty(_deacApprovalGroup, 'deaccessionApprovalGroup', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deaccessionApprovalGroup.name',
          'defaultMessage': 'Deaccession approval group'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'deaccessionapprovalgroup'
        }
      }
    })), _defineProperty(_deacApprovalGroup, 'deaccessionApprovalStatus', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deaccessionApprovalStatus.name',
          'defaultMessage': 'Deaccession approval status'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'deaccessionapprovalstatus'
        }
      }
    })), _defineProperty(_deacApprovalGroup, 'deaccessionApprovalDate', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deaccessionApprovalDate.name',
          'defaultMessage': 'Deaccession approval date'
        }
      }),
      view: {
        type: DateInput
      }
    })), _deacApprovalGroup)), _deacApprovalGroupLis)), _defineProperty(_ns2Objectexit_commo, 'deaccessionAuthorizer', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deaccessionAuthorizer.name',
          'defaultMessage': 'Deaccession authorizer'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'authorizationDate', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.authorizationDate.name',
          'defaultMessage': 'Authorization date'
        }
      }),
      view: {
        type: DateInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'deaccessionDate', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.deaccessionDate.name',
          'defaultMessage': 'Deaccession date'
        }
      }),
      view: {
        type: DateInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalDate', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalDate.name',
          'defaultMessage': 'Disposal date'
        }
      }),
      view: {
        type: DateInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalMethod', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalMethod.name',
          'defaultMessage': 'Disposal method'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'disposalmethod'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalReason', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalReason.name',
          'defaultMessage': 'Disposal reason'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalProvisos', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalProvisos.name',
          'defaultMessage': 'Disposal provisos'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalProposedRecipient', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalProposedRecipient.name',
          'defaultMessage': 'Disposal proposed recipient'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalRecipient', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalRecipient.name',
          'defaultMessage': 'Disposal recipient'
        }
      }),
      view: {
        type: AutocompleteInput,
        props: {
          source: 'person/local,person/shared,organization/local,organization/shared'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalNote', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalNote.name',
          'defaultMessage': 'Disposal note'
        }
      }),
      view: {
        type: TextInput,
        props: {
          multiline: true
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalCurrency.name',
          'defaultMessage': 'Disposal currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'disposalValue', _defineProperty({}, config, {
      dataType: DATA_TYPE_FLOAT,
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.disposalValue.name',
          'defaultMessage': 'Disposal value'
        }
      }),
      view: {
        type: TextInput
      }
    })), _defineProperty(_ns2Objectexit_commo, 'groupDisposalCurrency', _defineProperty({}, config, {
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.groupDisposalCurrency.name',
          'defaultMessage': 'Group disposal currency'
        }
      }),
      view: {
        type: TermPickerInput,
        props: {
          source: 'currency'
        }
      }
    })), _defineProperty(_ns2Objectexit_commo, 'groupDisposalValue', _defineProperty({}, config, {
      dataType: DATA_TYPE_FLOAT,
      messages: (0, _reactIntl.defineMessages)({
        name: {
          'id': 'field.objectexit_common.groupDisposalValue.name',
          'defaultMessage': 'Group disposal value'
        }
      }),
      view: {
        type: TextInput
      }
    })), _ns2Objectexit_commo)), _document)
  };
};