"use strict";

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

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

const template = pluginContext => {
  const React = pluginContext.lib.React;
  var _pluginContext$layout = pluginContext.layoutComponents;
  const Col = _pluginContext$layout.Col,
        Cols = _pluginContext$layout.Cols,
        Panel = _pluginContext$layout.Panel,
        Row = _pluginContext$layout.Row;
  var _pluginContext$record = pluginContext.recordComponents;
  const Field = _pluginContext$record.Field,
        InputTable = _pluginContext$record.InputTable;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "location", collapsible: true },
      React.createElement(
        Row,
        null,
        React.createElement(Field, { name: "movementReferenceNumber" }),
        React.createElement(Field, { name: "normalLocation" })
      ),
      React.createElement(
        InputTable,
        { name: "currentLocation" },
        React.createElement(Field, { name: "currentLocation" }),
        React.createElement(Field, { name: "currentLocationFitness" }),
        React.createElement(Field, { name: "currentLocationNote" })
      ),
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "locationDate" })
        ),
        React.createElement(Col, null)
      )
    ),
    React.createElement(
      Panel,
      { name: "movement", collapsible: true, collapsed: true },
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "reasonForMove" }),
          React.createElement(
            Field,
            { name: "movementMethods" },
            React.createElement(Field, { name: "movementMethod" })
          ),
          React.createElement(
            Row,
            null,
            React.createElement(Field, { name: "plannedRemovalDate" }),
            React.createElement(Field, { name: "removalDate" })
          )
        ),
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "movementContact" }),
          React.createElement(Field, { name: "movementNote" })
        )
      )
    ),
    React.createElement(
      Panel,
      { name: "inventory", collapsible: true, collapsed: true },
      React.createElement(
        Cols,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "inventoryActionRequired" }),
          React.createElement(Field, { name: "frequencyForInventory" }),
          React.createElement(
            Row,
            null,
            React.createElement(Field, { name: "inventoryDate" }),
            React.createElement(Field, { name: "nextInventoryDate" })
          )
        ),
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "inventoryContactList" },
            React.createElement(Field, { name: "inventoryContact" })
          ),
          React.createElement(Field, { name: "inventoryNote" })
        )
      )
    )
  );
};

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