"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 Panel = _configContext$layout.Panel,
        Row = _configContext$layout.Row;
  var _configContext$record = configContext.recordComponents;
  const Field = _configContext$record.Field,
        InputTable = _configContext$record.InputTable;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "info", collapsible: true },
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "loanOutNumber" }),
        React.createElement(Field, { name: "loanPurpose" })
      ),
      React.createElement(
        InputTable,
        { name: "lender" },
        React.createElement(Field, { name: "lendersAuthorizer" }),
        React.createElement(Field, { name: "lendersContact" }),
        React.createElement(Field, { name: "lendersAuthorizationDate" })
      ),
      React.createElement(
        InputTable,
        { name: "borrower" },
        React.createElement(Field, { name: "borrower" }),
        React.createElement(Field, { name: "borrowersContact" }),
        React.createElement(Field, { name: "borrowersAuthorizer" }),
        React.createElement(Field, { name: "borrowersAuthorizationDate" })
      ),
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "specialConditionsOfLoan" }),
        React.createElement(Field, { name: "loanOutNote" })
      ),
      React.createElement(
        Field,
        { name: "loanStatusGroupList" },
        React.createElement(
          Field,
          { name: "loanStatusGroup" },
          React.createElement(Field, { name: "loanStatus" }),
          React.createElement(Field, { name: "loanStatusDate" }),
          React.createElement(Field, { name: "loanStatusNote" })
        )
      ),
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "loanOutDate" }),
        React.createElement(Field, { name: "loanReturnDate" }),
        React.createElement(Field, { name: "loanRenewalApplicationDate" })
      )
    )
  );
};

exports.default = configContext => ({
  messages: (0, _reactIntl.defineMessages)({
    name: {
      "id": "form.loanout.default.name",
      "defaultMessage": "Standard Template"
    }
  }),
  template: template(configContext)
});