'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 _completenessGroup, _completenessGroupLis, _conditionCheckGroup, _conditionCheckGroupL, _envConditionNoteGrou, _envConditionNoteGrou2, _techAssessmentGroup, _techAssessmentGroupL, _hazardGroup, _hazardGroupList, _salvagePriorityCodeG, _salvagePriorityCodeG2, _legalReqsHeldGroup, _legalReqsHeldGroupLi, _ns2Conditionchecks_;

  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;
  var config = pluginContext.configHelpers.configKey;
  var DATA_TYPE_DATE = pluginContext.dataTypes.DATA_TYPE_DATE;
  var extensions = pluginContext.config.extensions;


  return {
    document: Object.assign(_defineProperty({}, config, {
      view: {
        type: CompoundInput,
        props: {
          defaultChildSubpath: 'ns2:conditionchecks_common'
        }
      }
    }), extensions.core.fields, {
      'ns2:conditionchecks_common': (_ns2Conditionchecks_ = {}, _defineProperty(_ns2Conditionchecks_, config, {
        service: {
          ns: 'http://collectionspace.org/services/conditioncheck'
        }
      }), _defineProperty(_ns2Conditionchecks_, 'objectAuditCategory', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.objectAuditCategory.name',
            'defaultMessage': 'Object audit category'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'objectAuditCategories'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'completenessGroupList', (_completenessGroupLis = {}, _defineProperty(_completenessGroupLis, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_completenessGroupLis, 'completenessGroup', (_completenessGroup = {}, _defineProperty(_completenessGroup, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.completenessGroup.name',
            'defaultMessage': 'Completeness'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_completenessGroup, 'completeness', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.completeness.name',
            'defaultMessage': 'Description'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'completenessLevels'
          }
        }
      })), _defineProperty(_completenessGroup, 'completenessDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.completenessDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.completenessDate.fullName',
            'defaultMessage': 'Completeness date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_completenessGroup, 'completenessNote', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.completenessNote.name',
            'defaultMessage': 'Note'
          }
        }),
        view: {
          type: TextInput
        }
      })), _completenessGroup)), _completenessGroupLis)), _defineProperty(_ns2Conditionchecks_, 'conditionCheckGroupList', (_conditionCheckGroupL = {}, _defineProperty(_conditionCheckGroupL, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_conditionCheckGroupL, 'conditionCheckGroup', (_conditionCheckGroup = {}, _defineProperty(_conditionCheckGroup, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckGroup.name',
            'defaultMessage': 'Condition'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_conditionCheckGroup, 'condition', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.condition.name',
            'defaultMessage': 'Description'
          },
          fullName: {
            'id': 'field.conditionchecks_common.condition.fullName',
            'defaultMessage': 'Condition description'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'conditions'
          }
        }
      })), _defineProperty(_conditionCheckGroup, 'conditionDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.conditionDate.fullName',
            'defaultMessage': 'Condition date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_conditionCheckGroup, 'conditionNote', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionNote.name',
            'defaultMessage': 'Note'
          }
        }),
        view: {
          type: TextInput
        }
      })), _conditionCheckGroup)), _conditionCheckGroupL)), _defineProperty(_ns2Conditionchecks_, 'conservationTreatmentPriority', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conservationTreatmentPriority.name',
            'defaultMessage': 'Conservation treatment priority'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'conservationTreatmentPriorities'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'envConditionNoteGroupList', (_envConditionNoteGrou2 = {}, _defineProperty(_envConditionNoteGrou2, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_envConditionNoteGrou2, 'envConditionNoteGroup', (_envConditionNoteGrou = {}, _defineProperty(_envConditionNoteGrou, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.envConditionNoteGroup.name',
            'defaultMessage': 'Environmental condition'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_envConditionNoteGrou, 'envConditionNote', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.envConditionNote.name',
            'defaultMessage': 'Note'
          }
        }),
        view: {
          type: TextInput
        }
      })), _defineProperty(_envConditionNoteGrou, 'envConditionNoteDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.envConditionNoteDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.envConditionNoteDate.fullName',
            'defaultMessage': 'Environmental condition date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _envConditionNoteGrou)), _envConditionNoteGrou2)), _defineProperty(_ns2Conditionchecks_, 'nextConditionCheckDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.nextConditionCheckDate.name',
            'defaultMessage': 'Next check/assessment date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_ns2Conditionchecks_, 'techAssessmentGroupList', (_techAssessmentGroupL = {}, _defineProperty(_techAssessmentGroupL, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_techAssessmentGroupL, 'techAssessmentGroup', (_techAssessmentGroup = {}, _defineProperty(_techAssessmentGroup, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.techAssessmentGroup.name',
            'defaultMessage': 'Technical assessment'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_techAssessmentGroup, 'techAssessment', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.techAssessment.name',
            'defaultMessage': 'Description'
          }
        }),
        view: {
          type: TextInput
        }
      })), _defineProperty(_techAssessmentGroup, 'techAssessmentDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.techAssessmentDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.techAssessmentDate.fullName',
            'defaultMessage': 'Technical assessment date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _techAssessmentGroup)), _techAssessmentGroupL)), _defineProperty(_ns2Conditionchecks_, 'hazardGroupList', (_hazardGroupList = {}, _defineProperty(_hazardGroupList, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_hazardGroupList, 'hazardGroup', (_hazardGroup = {}, _defineProperty(_hazardGroup, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.hazardGroup.name',
            'defaultMessage': 'Hazard'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_hazardGroup, 'hazard', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.hazard.name',
            'defaultMessage': 'Description'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'hazards'
          }
        }
      })), _defineProperty(_hazardGroup, 'hazardDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.hazardDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.hazardDate.fullName',
            'defaultMessage': 'Hazard date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_hazardGroup, 'hazardNote', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.hazardNote.name',
            'defaultMessage': 'Note'
          }
        }),
        view: {
          type: TextInput
        }
      })), _hazardGroup)), _hazardGroupList)), _defineProperty(_ns2Conditionchecks_, 'conditionCheckAssessmentDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckAssessmentDate.name',
            'defaultMessage': 'Check/assessment date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_ns2Conditionchecks_, 'conditionCheckMethod', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckMethod.name',
            'defaultMessage': 'Method'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'conditionCheckMethods'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'conditionCheckNote', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckNote.name',
            'defaultMessage': 'Note'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'conditionCheckReason', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckReason.name',
            'defaultMessage': 'Reason'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'conditionCheckReasons'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'conditionCheckRefNumber', _defineProperty({}, config, {
        cloneable: false,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionCheckRefNumber.name',
            'defaultMessage': 'Reference number'
          }
        }),
        required: true,
        searchView: {
          type: TextInput
        },
        view: {
          type: IDGeneratorInput,
          props: {
            idGeneratorName: 'conditioncheck'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'conditionChecker', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.conditionChecker.name',
            'defaultMessage': 'Checker/assessor'
          }
        }),
        view: {
          type: AutocompleteInput,
          props: {
            source: 'person/local,person/shared,organization/local,organization/shared'
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'displayRecommendations', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.displayRecommendations.name',
            'defaultMessage': 'Display recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'envRecommendations', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.envRecommendations.name',
            'defaultMessage': 'Environmental recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'handlingRecommendations', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.handlingRecommendations.name',
            'defaultMessage': 'Handling recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'packingRecommendations', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.packingRecommendations.name',
            'defaultMessage': 'Packing recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'securityRecommendations', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.securityRecommendations.name',
            'defaultMessage': 'Security recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'specialRequirements', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.specialRequirements.name',
            'defaultMessage': 'Special requirement'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'storageRequirements', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.storageRequirements.name',
            'defaultMessage': 'Storage recommendation'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'legalRequirements', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalRequirements.name',
            'defaultMessage': 'Legal requirement'
          }
        }),
        view: {
          type: TextInput,
          props: {
            multiline: true
          }
        }
      })), _defineProperty(_ns2Conditionchecks_, 'salvagePriorityCodeGroupList', (_salvagePriorityCodeG2 = {}, _defineProperty(_salvagePriorityCodeG2, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_salvagePriorityCodeG2, 'salvagePriorityCodeGroup', (_salvagePriorityCodeG = {}, _defineProperty(_salvagePriorityCodeG, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.salvagePriorityCodeGroup.name',
            'defaultMessage': 'Salvage priority'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_salvagePriorityCodeG, 'salvagePriorityCode', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.salvagePriorityCode.name',
            'defaultMessage': 'Code'
          }
        }),
        view: {
          type: OptionPickerInput,
          props: {
            source: 'salvagePriorityCodes'
          }
        }
      })), _defineProperty(_salvagePriorityCodeG, 'salvagePriorityCodeDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.salvagePriorityCodeDate.name',
            'defaultMessage': 'Date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.salvagePriorityCodeDate.fullName',
            'defaultMessage': 'Salvage priority date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _salvagePriorityCodeG)), _salvagePriorityCodeG2)), _defineProperty(_ns2Conditionchecks_, 'legalReqsHeldGroupList', (_legalReqsHeldGroupLi = {}, _defineProperty(_legalReqsHeldGroupLi, config, {
        view: {
          type: CompoundInput
        }
      }), _defineProperty(_legalReqsHeldGroupLi, 'legalReqsHeldGroup', (_legalReqsHeldGroup = {}, _defineProperty(_legalReqsHeldGroup, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeldGroup.name',
            'defaultMessage': 'Legal/license requirement held'
          }
        }),
        repeating: true,
        view: {
          type: CompoundInput,
          props: {
            tabular: true
          }
        }
      }), _defineProperty(_legalReqsHeldGroup, 'legalReqsHeld', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeld.name',
            'defaultMessage': 'Description'
          }
        }),
        view: {
          type: TextInput
        }
      })), _defineProperty(_legalReqsHeldGroup, 'legalReqsHeldBeginDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeldBeginDate.name',
            'defaultMessage': 'Begin date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.legalReqsHeldBeginDate.fullName',
            'defaultMessage': 'Legal/license requirement begin date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_legalReqsHeldGroup, 'legalReqsHeldEndDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeldEndDate.name',
            'defaultMessage': 'End date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.legalReqsHeldEndDate.fullName',
            'defaultMessage': 'Legal/license requirement end date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _defineProperty(_legalReqsHeldGroup, 'legalReqsHeldNumber', _defineProperty({}, config, {
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeldNumber.name',
            'defaultMessage': 'Number'
          }
        }),
        view: {
          type: TextInput
        }
      })), _defineProperty(_legalReqsHeldGroup, 'legalReqsHeldRenewDate', _defineProperty({}, config, {
        dataType: DATA_TYPE_DATE,
        messages: (0, _reactIntl.defineMessages)({
          name: {
            'id': 'field.conditionchecks_common.legalReqsHeldRenewDate.name',
            'defaultMessage': 'Renewal date'
          },
          fullName: {
            'id': 'field.conditionchecks_common.legalReqsHeldRenewDate.fullName',
            'defaultMessage': 'Legal/license requirement renewal date'
          }
        }),
        view: {
          type: DateInput
        }
      })), _legalReqsHeldGroup)), _legalReqsHeldGroupLi)), _ns2Conditionchecks_)
    })
  };
};