"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactIntl = require("react-intl");
var _default = configContext => {
  const {
    CheckboxInput,
    CompoundInput,
    ObjectNameInput,
    OptionPickerInput,
    TextInput
  } = configContext.inputComponents;
  const {
    configKey: config
  } = configContext.configHelpers;
  const {
    DATA_TYPE_BOOL
  } = configContext.dataTypes;
  return {
    document: {
      [config]: {
        view: {
          type: CompoundInput,
          props: {
            defaultChildSubpath: 'ns2:reports_common'
          }
        }
      },
      'ns2:reports_common': {
        [config]: {
          service: {
            ns: 'http://collectionspace.org/services/report'
          },
          view: {
            type: CompoundInput
          }
        },
        name: {
          [config]: {
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.name.name",
                "defaultMessage": "Name"
              }
            }),
            view: {
              type: TextInput
            }
          }
        },
        filename: {
          [config]: {
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.filename.name",
                "defaultMessage": "Jasper report file"
              }
            }),
            view: {
              type: TextInput,
              props: {
                readOnly: true
              }
            }
          }
        },
        notes: {
          [config]: {
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.notes.name",
                "defaultMessage": "Description"
              }
            }),
            view: {
              type: TextInput,
              props: {
                multiline: true
              }
            }
          }
        },
        supportsNoContext: {
          [config]: {
            dataType: DATA_TYPE_BOOL,
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.supportsNoContext.name",
                "defaultMessage": "All records"
              }
            }),
            view: {
              type: CheckboxInput,
              props: {
                readOnly: true
              }
            }
          }
        },
        supportsGroup: {
          [config]: {
            dataType: DATA_TYPE_BOOL,
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.supportsGroup.name",
                "defaultMessage": "Group"
              }
            }),
            view: {
              type: CheckboxInput,
              props: {
                readOnly: true
              }
            }
          }
        },
        supportsDocList: {
          [config]: {
            dataType: DATA_TYPE_BOOL,
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.supportsDocList.name",
                "defaultMessage": "Record list"
              }
            }),
            view: {
              type: CheckboxInput,
              props: {
                readOnly: true
              }
            }
          }
        },
        supportsSingleDoc: {
          [config]: {
            dataType: DATA_TYPE_BOOL,
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.supportsSingleDoc.name",
                "defaultMessage": "Single record"
              }
            }),
            view: {
              type: CheckboxInput,
              props: {
                readOnly: true
              }
            }
          }
        },
        forDocTypes: {
          [config]: {
            view: {
              type: CompoundInput
            }
          },
          forDocType: {
            [config]: {
              messages: (0, _reactIntl.defineMessages)({
                name: {
                  "id": "field.reports_common.forDocType.name",
                  "defaultMessage": "For record type"
                }
              }),
              repeating: true,
              view: {
                type: ObjectNameInput,
                props: {
                  readOnly: true
                }
              }
            }
          }
        },
        outputMIME: {
          [config]: {
            messages: (0, _reactIntl.defineMessages)({
              name: {
                "id": "field.reports_common.outputMIME.name",
                "defaultMessage": "Default output format"
              }
            }),
            view: {
              type: OptionPickerInput,
              props: {
                source: 'reportMimeTypes',
                readOnly: true
              }
            }
          }
        }
      }
    }
  };
};
exports.default = _default;