"use strict";

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

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

const template = configContext => {
  const React = configContext.lib.React;
  var _configContext$layout = configContext.layoutComponents;
  const Col = _configContext$layout.Col,
        Cols = _configContext$layout.Cols,
        Panel = _configContext$layout.Panel,
        Row = _configContext$layout.Row;
  const Field = configContext.recordComponents.Field;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "objectEntryInfo", collapsible: true },
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "entryNumber" }),
          React.createElement(Field, { name: "entryReason" })
        ),
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "entryDate" }),
          React.createElement(
            Field,
            { name: "entryMethods" },
            React.createElement(Field, { name: "entryMethod" })
          )
        )
      ),
      React.createElement(Field, { name: "entryNote" })
    ),
    React.createElement(
      Panel,
      { name: "location", collapsible: true, collapsed: true },
      React.createElement(
        Field,
        { name: "currentLocationGroupList" },
        React.createElement(
          Field,
          { name: "currentLocationGroup" },
          React.createElement(Field, { name: "currentLocation" }),
          React.createElement(Field, { name: "currentLocationFitness" }),
          React.createElement(Field, { name: "currentLocationNote" })
        )
      ),
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "locationDate" }),
        React.createElement(Col, null)
      )
    ),
    React.createElement(
      Panel,
      { name: "condition", collapsible: true, collapsed: true },
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "conditionCheckMethods" },
            React.createElement(Field, { name: "conditionCheckMethod" })
          ),
          React.createElement(
            Field,
            { name: "conditionCheckReasons" },
            React.createElement(Field, { name: "conditionCheckReason" })
          ),
          React.createElement(
            Field,
            { name: "conditionCheckersOrAssessors" },
            React.createElement(Field, { name: "conditionCheckerOrAssessor" })
          )
        ),
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "conditionCheckDate" }),
          React.createElement(Field, { name: "conditionCheckReferenceNumber" })
        )
      ),
      React.createElement(Field, { name: "conditionCheckNote" })
    )
  );
};

exports.default = configContext => ({
  messages: (0, _reactIntl.defineMessages)({
    name: {
      "id": "form.intake.doorstep.name",
      "defaultMessage": "Doorstep Donation Template"
    }
  }),
  sortOrder: 1,
  template: template(configContext)
});