"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,
        Panel = _pluginContext$layout.Panel,
        Row = _pluginContext$layout.Row;
  const Field = pluginContext.recordComponents.Field;
  const extensions = pluginContext.config.extensions;


  return React.createElement(
    Field,
    { name: "document" },
    React.createElement(
      Panel,
      { name: "id", collapsible: true },
      React.createElement(
        Row,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(Field, { name: "objectNumber" }),
          React.createElement(
            Field,
            { name: "otherNumberList" },
            React.createElement(
              Field,
              { name: "otherNumber" },
              React.createElement(Field, { name: "numberValue" }),
              React.createElement(Field, { name: "numberType" })
            )
          ),
          React.createElement(
            Field,
            { name: "inventoryStatusList" },
            React.createElement(Field, { name: "inventoryStatus" })
          )
        ),
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "briefDescriptions" },
            React.createElement(Field, { name: "briefDescription" })
          )
        )
      ),
      React.createElement(
        Field,
        { name: "titleGroupList" },
        React.createElement(
          Field,
          { name: "titleGroup" },
          React.createElement(
            Panel,
            null,
            React.createElement(
              Row,
              null,
              React.createElement(
                Col,
                null,
                React.createElement(Field, { name: "title" }),
                React.createElement(Field, { name: "titleLanguage" })
              ),
              React.createElement(
                Col,
                null,
                React.createElement(Field, { name: "titleType" }),
                React.createElement(
                  Field,
                  { name: "titleTranslationSubGroupList" },
                  React.createElement(
                    Field,
                    { name: "titleTranslationSubGroup" },
                    React.createElement(Field, { name: "titleTranslation" }),
                    React.createElement(Field, { name: "titleTranslationLanguage" })
                  )
                )
              )
            )
          )
        )
      ),
      React.createElement(
        Field,
        { name: "objectNameList" },
        React.createElement(
          Field,
          { name: "objectNameGroup" },
          React.createElement(Field, { name: "objectName" }),
          React.createElement(Field, { name: "objectNameCurrency" }),
          React.createElement(Field, { name: "objectNameLevel" }),
          React.createElement(Field, { name: "objectNameSystem" }),
          React.createElement(Field, { name: "objectNameType" }),
          React.createElement(Field, { name: "objectNameLanguage" }),
          React.createElement(Field, { name: "objectNameNote" })
        )
      )
    ),
    React.createElement(
      Panel,
      { name: "desc", collapsible: true, collapsed: true },
      extensions.dimension.form
    ),
    React.createElement(
      Panel,
      { name: "prod", collapsible: true, collapsed: true },
      React.createElement(
        Row,
        null,
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "objectProductionDateGroupList" },
            React.createElement(Field, { name: "objectProductionDateGroup" })
          ),
          React.createElement(
            Field,
            { name: "objectProductionPersonGroupList" },
            React.createElement(
              Field,
              { name: "objectProductionPersonGroup" },
              React.createElement(Field, { name: "objectProductionPerson" }),
              React.createElement(Field, { name: "objectProductionPersonRole" })
            )
          )
        ),
        React.createElement(
          Col,
          null,
          React.createElement(
            Field,
            { name: "objectProductionOrganizationGroupList" },
            React.createElement(
              Field,
              { name: "objectProductionOrganizationGroup" },
              React.createElement(Field, { name: "objectProductionOrganization" }),
              React.createElement(Field, { name: "objectProductionOrganizationRole" })
            )
          )
        )
      )
    ),
    React.createElement(
      Panel,
      { name: "hierarchy", collapsible: true, collapsed: true },
      React.createElement(Field, { name: "relation-list-item", subpath: "rel:relations-common-list" })
    )
  );
};

exports.default = pluginContext => ({
  messages: (0, _reactIntl.defineMessages)({
    name: {
      "id": "form.collectionobject.inventory.name",
      "defaultMessage": "Inventory Template"
    }
  }),
  sortOrder: 1,
  template: template(pluginContext)
});